home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume15 / touchup / patch2 < prev    next >
Encoding:
Internet Message Format  |  1988-06-30  |  65.5 KB

  1. Subject:  v15i076:  A bitmap editor for suns, Patch2
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: Raymond T Kreisel <rayk@sbcs.sunysb.edu>
  7. Posting-number: Volume 15, Issue 76
  8. Archive-name: touchup/patch2
  9.  
  10. #! /bin/sh
  11. # This is a shell archive.  Remove anything before this line, then unpack
  12. # it by saving it into a file and typing "sh file".  To overwrite existing
  13. # files, type "sh file -c".  You can also feed this as standard input via
  14. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  15. # will see the following message at the end:
  16. #        "End of archive 2 (of 2)."
  17. # Contents:  DIFFS.2 scale.cicon
  18. # Wrapped by rayk@sbmiclr on Fri Jun 17 00:32:01 1988
  19. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  20. if test -f DIFFS.2 -a "${1}" != "-c" ; then 
  21.   echo shar: Will not over-write existing file \"DIFFS.2\"
  22. else
  23. echo shar: Extracting \"DIFFS.2\" \(61044 characters\)
  24. sed "s/^X//" >DIFFS.2 <<'END_OF_DIFFS.2'
  25. Xdiff -c ./INSTALL ../../Ver2.3/source/INSTALL
  26. X*** ./INSTALL    Mon Jun 13 23:52:01 1988
  27. X--- ../../Ver2.3/source/INSTALL    Fri Jun 17 00:25:31 1988
  28. X***************
  29. X*** 35,38 ****
  30. X  
  31. X      If you are using Touchup on a color Sun you may want to
  32. X      use the -n option (you can read about this in the man page)
  33. X!     so the it will run faster.
  34. X--- 35,48 ----
  35. X  
  36. X      If you are using Touchup on a color Sun you may want to
  37. X      use the -n option (you can read about this in the man page)
  38. X!     so that it will run faster.
  39. X! 
  40. X!     After you have installed touchup, these are the files
  41. X!     you must have in order to run the execuatble code:
  42. X! 
  43. X!         touchup*
  44. X!         info.image
  45. X!         touchup.cat
  46. X! 
  47. X!     The rest of the files can be removed.
  48. X! 
  49. Xdiff -c ./Makefile ../../Ver2.3/source/Makefile
  50. X*** ./Makefile    Mon Jun 13 23:52:00 1988
  51. X--- ../../Ver2.3/source/Makefile    Fri Jun 17 00:25:29 1988
  52. X***************
  53. X*** 1,6 ****
  54. X! CFLAGS = -O
  55. X! OPTIONS =
  56. X! LIBS = -lsuntool -lsunwindow -lpixrect -lm
  57. X  EXE = touchup
  58. X  OBJ =   ffill.o cms_rainbow.o oval.o circle.o confirmer.o fat.o touchup.o \
  59. X      info.o fonts.o brush.o command.o color_palet.o \
  60. X--- 1,6 ----
  61. X! CFLAGS = -g
  62. X! OPTIONS = -DSunOS_3.4
  63. X! LIBS = -lsuntool -lsunwindow -lpixrect
  64. X  EXE = touchup
  65. X  OBJ =   ffill.o cms_rainbow.o oval.o circle.o confirmer.o fat.o touchup.o \
  66. X      info.o fonts.o brush.o command.o color_palet.o \
  67. X***************
  68. X*** 20,25 ****
  69. X--- 20,29 ----
  70. X  ################################################################
  71. X  #   change these dirs if you move the files
  72. X  ################################################################
  73. X+ # next line must be hard coded if not using csh; no trailing space!
  74. X+ # remove the comment at the begining of the next line if you are
  75. X+ # not using csh and set the path to the path of the dir that touchup is in.
  76. X+ #PWD=/usr/yourlogin/src/touchup    
  77. X  BASE_DIR = $(PWD)
  78. X  PATTERNS_DIR = $(BASE_DIR)
  79. X  COMMANDS_DIR = $(BASE_DIR)
  80. X***************
  81. X*** 30,63 ****
  82. X  
  83. X  
  84. X  $(EXE): $(OBJ) touchup.cat
  85. X!     cc $(CFLAGS) -o $(EXE) $(OBJ) $(OPTIONS) $(LIBS)
  86. X  
  87. X  
  88. X- 
  89. X  lint_it: $(SRC)
  90. X      lint $(SRC) $(OPTIONS) $(LIBS)
  91. X  
  92. X  
  93. X  interface.o :
  94. X!     cc $(CFLAGS)  -mc68020 -c  interface.c -I$(PATTERNS_DIR)
  95. X  
  96. X  pattern.o:
  97. X!     cc $(CFLAGS)  -mc68020 -c  pattern.c -I$(PATTERNS_DIR)
  98. X  
  99. X  brush.o:
  100. X!     cc $(CFLAGS)  -mc68020 -c  brush.c -I$(PATTERNS_DIR)
  101. X  
  102. X  command.o:
  103. X!     cc $(CFLAGS)  -mc68020 -c  command.c -I$(COMMANDS_DIR)
  104. X  
  105. X  fat.o:
  106. X!     cc $(CFLAGS)  -mc68020 -c fat.c $(OPTIONS) -DNO_FASTAN
  107. X  
  108. X  info.o:
  109. X!     cc $(CFLAGS)  -mc68020 -c info.c $(OPTIONS) -DINFO_IMAGE='"$(INFO_PICTURE)"' -DHELP_FILE='"$(MAN_PAGE)"'
  110. X  
  111. X  touchup.o:
  112. X!     cc $(CFLAGS)  -mc68020 -c touchup.c $(OPTIONS)
  113. X  
  114. X  
  115. X  touchup.cat: touchup.man
  116. X--- 34,70 ----
  117. X  
  118. X  
  119. X  $(EXE): $(OBJ) touchup.cat
  120. X!     $(CC) $(CFLAGS) -o $(EXE) $(OBJ) $(OPTIONS) $(LIBS)
  121. X!     strip touchup             #final version
  122. X  
  123. X  
  124. X  lint_it: $(SRC)
  125. X      lint $(SRC) $(OPTIONS) $(LIBS)
  126. X  
  127. X  
  128. X  interface.o :
  129. X!     $(CC) $(CFLAGS)  -c  interface.c -I$(PATTERNS_DIR) $(OPTIONS)
  130. X  
  131. X  pattern.o:
  132. X!     $(CC) $(CFLAGS)  -c  pattern.c -I$(PATTERNS_DIR) $(OPTIONS)
  133. X  
  134. X  brush.o:
  135. X!     $(CC) $(CFLAGS)  -c  brush.c -I$(PATTERNS_DIR) $(OPTIONS)
  136. X  
  137. X  command.o:
  138. X!     $(CC) $(CFLAGS)  -c  command.c -I$(COMMANDS_DIR) $(OPTIONS)
  139. X  
  140. X  fat.o:
  141. X!     $(CC) $(CFLAGS)  -c fat.c $(OPTIONS) -DNO_FASTAN
  142. X  
  143. X+ circle.o:
  144. X+     $(CC) $(CFLAGS)  -c circle.c $(OPTIONS)
  145. X+ 
  146. X  info.o:
  147. X!     $(CC) $(CFLAGS)  -c info.c $(OPTIONS) -DINFO_IMAGE='"$(INFO_PICTURE)"' -DHELP_FILE='"$(MAN_PAGE)"'
  148. X  
  149. X  touchup.o:
  150. X!     $(CC) $(CFLAGS)  -c touchup.c $(OPTIONS)
  151. X  
  152. X  
  153. X  touchup.cat: touchup.man
  154. X***************
  155. X*** 66,82 ****
  156. X  
  157. X  shar:
  158. X      uuencode info.image info.image > temp_image
  159. X!     shar -b -n1 -e6 *.h Makefile INSTALL README touchup.man \
  160. X          fixman.sed temp_image touchup.icon \
  161. X              $(SH_PATTERNS_DIR)/fat_cursor \
  162. X              $(SH_PATTERNS_DIR)/strip_icon32x32 \
  163. X              $(SH_COMMANDS_DIR)/strip_icon48x48 > touchup.shar1
  164. X!     shar -b -n2 -e6 $(SH_COMMANDS_DIR)/*.cicon > touchup.shar2
  165. X!     shar -b -n3 -e6 $(SH_PATTERNS_DIR)/pattern[1-2]*.icon > touchup.shar3
  166. X!     shar -b -n4 -e6 $(SH_PATTERNS_DIR)/pattern[3-9]*.icon \
  167. X              $(SH_PATTERNS_DIR)/brush[1-9].icon > touchup.shar4
  168. X!     shar -b -n5 -e6 [a-h]*.c > touchup.shar5
  169. X!     shar -b -n6 -e6 [h-z]*.c > touchup.shar6
  170. X      rm -f temp_image
  171. X  
  172. X  install:
  173. X--- 73,90 ----
  174. X  
  175. X  shar:
  176. X      uuencode info.image info.image > temp_image
  177. X!     shar -b -n1 -e7 *.h Makefile INSTALL README touchup.man \
  178. X          fixman.sed temp_image touchup.icon \
  179. X              $(SH_PATTERNS_DIR)/fat_cursor \
  180. X              $(SH_PATTERNS_DIR)/strip_icon32x32 \
  181. X              $(SH_COMMANDS_DIR)/strip_icon48x48 > touchup.shar1
  182. X!     shar -b -n2 -e7 $(SH_COMMANDS_DIR)/*.cicon > touchup.shar2
  183. X!     shar -b -n3 -e7 $(SH_PATTERNS_DIR)/pattern[1-2]*.icon > touchup.shar3
  184. X!     shar -b -n4 -e7 $(SH_PATTERNS_DIR)/pattern[3-9]*.icon \
  185. X              $(SH_PATTERNS_DIR)/brush[1-9].icon > touchup.shar4
  186. X!     shar -b -n5 -e7 [a-d]*.c > touchup.shar5
  187. X!     shar -b -n6 -e7 [e-n]*.c > touchup.shar6
  188. X!     shar -b -n7 -e7 [o-z]*.c > touchup.shar7
  189. X      rm -f temp_image
  190. X  
  191. X  install:
  192. Xdiff -c ./README ../../Ver2.3/source/README
  193. X*** ./README    Mon Jun 13 23:52:02 1988
  194. X--- ../../Ver2.3/source/README    Fri Jun 17 00:25:33 1988
  195. X***************
  196. X*** 21,40 ****
  197. X  
  198. X  **************************************************************************/
  199. X  
  200. X!     Be sure to read the instructions in INSTALL first.
  201. X  
  202. X!     There in is a manual in file touchup.man
  203. X  
  204. X  
  205. X!     After you have installed touchup these are the files
  206. X!     you must have in order to run the execuatble code:
  207. X  
  208. X-         touchup*
  209. X-         info.image
  210. X-         touchup.cat
  211. X- 
  212. X- 
  213. X-     The rest of the files can be removed.
  214. X  
  215. X      If you are using Touchup on a color Sun you may want to
  216. X      use the -n option (you can read about this in the man page)
  217. X--- 21,45 ----
  218. X  
  219. X  **************************************************************************/
  220. X  
  221. X! =====>    Be sure to read the instructions in INSTALL first.  <=====
  222. X  
  223. X!     Touchup is a public domain bitmap editor for Sun workstations
  224. X!     that is very useful for "fixing" screen dumps and doing other
  225. X!     types of bitmap editing.  Touchup is a powerful bitmap editor,
  226. X!     a few of the capabilities are listed below:
  227. X  
  228. X+         - paint with different textures
  229. X+         - draw circles, rectangles, ovals, lines, and polygons
  230. X+         - examine and modify a region at magnification 1-20
  231. X+         - use text in many fonts
  232. X+         - flood fill an area
  233. X+         - lasso a free form region within a bitmap
  234. X+         - scale-stretch a region of a bitmap
  235. X+         - rotate a region
  236. X+         - move a region
  237. X  
  238. X!     There in is a manual in file touchup.man
  239. X  
  240. X  
  241. X      If you are using Touchup on a color Sun you may want to
  242. X      use the -n option (you can read about this in the man page)
  243. Xdiff -c ./circle.c ../../Ver2.3/source/circle.c
  244. X*** ./circle.c    Mon Jun 13 23:53:10 1988
  245. X--- ../../Ver2.3/source/circle.c    Fri Jun 17 00:27:03 1988
  246. X***************
  247. X*** 25,31 ****
  248. X  /**************************************************************************
  249. X      file: circle.c
  250. X      purpose: This file contains that routines that draw circles
  251. X!         on the screen. A UNDOCUMENTED Sunview function "pw_polypoint"
  252. X          is used to get the list of points that make the circle
  253. X          on to the screen AMAZINGLY FAST.
  254. X          The points that make up the circle are calculated with
  255. X--- 25,31 ----
  256. X  /**************************************************************************
  257. X      file: circle.c
  258. X      purpose: This file contains that routines that draw circles
  259. X!         on the screen. A Sunview 3.4 function "pw_polypoint"
  260. X          is used to get the list of points that make the circle
  261. X          on to the screen AMAZINGLY FAST.
  262. X          The points that make up the circle are calculated with
  263. X***************
  264. X*** 35,40 ****
  265. X--- 35,44 ----
  266. X          date:    Tue Mar 22 22:04:58 EST 1988
  267. X          author:    rayk
  268. X          changes:add comments
  269. X+ 
  270. X+         date:    Fri Apr 22 17:11:02 EDT 1988
  271. X+         author:    rayk
  272. X+         changes:added pw_batching and bitops
  273. X  **************************************************************************/
  274. X  
  275. X  #include "header.h"
  276. X***************
  277. X*** 74,79 ****
  278. X--- 78,88 ----
  279. X               else
  280. X                  error = error + ((x-y--) << 2) + 10;
  281. X               x++;
  282. X+          if (numpts > MAX_PTS-8)
  283. X+           {
  284. X+         ERROR("Circle is too larege !");
  285. X+         return(0);
  286. X+          }
  287. X             }  /* end of while (x , y) */
  288. X     
  289. X             if (x == y)
  290. X***************
  291. X*** 84,111 ****
  292. X               ptlist[numpts].x=center.x-x;   ptlist[numpts++].y=center.y-y;
  293. X             }
  294. X  
  295. X!        my_pw_polypoint(pw,0,0,numpts,ptlist,PIX_SET);
  296. X  }  /* end of function draw_circle() */   
  297. X  
  298. X  
  299. X  
  300. X! my_pw_polypoint(temp_pw,off_x,off_y,count_pts,ptlist, ROP)
  301. X! Pixwin *temp_pw;
  302. X  int off_x,off_y,count_pts;
  303. X  struct pr_pos ptlist[];
  304. X  int ROP;
  305. X  {
  306. X  
  307. X!   if (image_depth > 1)
  308. X    {
  309. X      while(--count_pts > 0)
  310. X      {
  311. X!       pw_rop(temp_pw,off_x+ptlist[count_pts].x,off_y+ptlist[count_pts].y,1,1
  312. X!       ,PIX_COLOR(cur_color) | PIX_SRC ,pattern[0],0,0);
  313. X      }
  314. X    }
  315. X    else
  316. X    {
  317. X!     pw_polypoint(temp_pw,off_x,off_y,count_pts,ptlist,ROP);
  318. X    }
  319. X  }
  320. X--- 93,129 ----
  321. X               ptlist[numpts].x=center.x-x;   ptlist[numpts++].y=center.y-y;
  322. X             }
  323. X  
  324. X!        my_pw_polypoint(0,0,numpts,ptlist,ROP);
  325. X  }  /* end of function draw_circle() */   
  326. X  
  327. X  
  328. X  
  329. X! my_pw_polypoint(off_x,off_y,count_pts,ptlist, ROP)
  330. X  int off_x,off_y,count_pts;
  331. X  struct pr_pos ptlist[];
  332. X  int ROP;
  333. X  {
  334. X  
  335. X!   if (((ROP == (PIX_SRC)) || (ROP == (PIX_SRC | PIX_DST)))
  336. X!       && (image_depth == 1))
  337. X!      ROP = PIX_SET;
  338. X! 
  339. X! #ifdef SunOS_3.4
  340. X!   if ((image_depth > 1) || (ROP != (PIX_SET)))
  341. X    {
  342. X+ #endif
  343. X+     pw_batch_on(pw);
  344. X      while(--count_pts > 0)
  345. X      {
  346. X!       pw_rop(pw,off_x+ptlist[count_pts].x,off_y+ptlist[count_pts].y,1,1
  347. X!       ,PIX_COLOR(cur_color) | ROP ,pattern[0],0,0);
  348. X      }
  349. X+     pw_batch_off(pw);
  350. X+ #ifdef SunOS_3.4
  351. X    }
  352. X    else
  353. X    {
  354. X!     pw_polypoint(pw,off_x,off_y,count_pts,ptlist,PIX_SET);
  355. X    }
  356. X+ #endif
  357. X  }
  358. Xdiff -c ./cms_rainbow.c ../../Ver2.3/source/cms_rainbow.c
  359. X*** ./cms_rainbow.c    Mon Jun 13 23:53:12 1988
  360. X--- ../../Ver2.3/source/cms_rainbow.c    Fri Jun 17 00:27:05 1988
  361. X***************
  362. X*** 30,35 ****
  363. X--- 30,39 ----
  364. X          date:    Tue Mar 22 22:04:58 EST 1988
  365. X          author:    rayk
  366. X          changes:add comments
  367. X+ 
  368. X+         date:    Sat Jun  4 13:22:45 EST 1988
  369. X+         author:    rayk
  370. X+         changes:fixed color pallet so that it was continious
  371. X  **************************************************************************/
  372. X  
  373. X  extern unsigned char red[256],green[256],blue[256];
  374. X***************
  375. X*** 52,104 ****
  376. X      red = blue = green = 0;
  377. X  
  378. X      for (i = 2; i < 30; i++) {
  379. X!     red += 9;
  380. X!     set_colorentry(i, red, green, blue);
  381. X      }
  382. X!     set_colorentry(30, 255, 0, 0);    /* red */
  383. X      red = 255; blue = green = 0;
  384. X      for (i = 30; i < 62; i++) {
  385. X!     green += 6;
  386. X!     set_colorentry(i, red, green, blue);
  387. X      }
  388. X!     set_colorentry(62, 255, 195, 0);    /* orange */ /* note diff = 33 */
  389. X!     red = 255; blue = 0; green = 195;
  390. X      for (i = 63; i < 96; i++) {
  391. X!     green += 2;
  392. X!     set_colorentry(i, red, green, blue);
  393. X      }
  394. X!     set_colorentry(96, 255, 255, 0);    /* yellow */
  395. X      red = 255; blue = 0; green = 255;
  396. X      for (i = 97; i < 133; i++) {
  397. X!     red -= 7;
  398. X!     set_colorentry(i, red, green, blue);
  399. X      }
  400. X!     set_colorentry(133, 0, 255, 0);    /* green */
  401. X      red = blue = 0; green = 255;
  402. X      for (i = 134; i < 165; i++) {
  403. X!     green -= 8;
  404. X!     blue += 8;
  405. X!     set_colorentry(i, red, green, blue);
  406. X      }
  407. X!     set_colorentry(165, 0, 0, 255);    /* blue */
  408. X      red = green = 0; blue = 255;
  409. X      for (i = 165; i < 202; i++) {
  410. X!     red += 7;
  411. X!     set_colorentry(i, red, green, blue);
  412. X      }
  413. X!     set_colorentry(202, 255, 0, 255);    /* violet */
  414. X      red = blue = 255; green = 0;
  415. X      for (i = 203; i < 239; i++) {
  416. X!     green += 7;
  417. X!     set_colorentry(i, red, green, blue);
  418. X      }
  419. X!     set_colorentry(239, 255, 255, 255);    /* white */
  420. X      red = blue = green = 255;
  421. X      for (i = 239; i <= 255; i++) {
  422. X!     green -= 9;
  423. X!     red -= 9;
  424. X!     blue -= 9;
  425. X!     set_colorentry(i, red, green, blue);
  426. X      }
  427. X  }
  428. X- 
  429. X--- 56,108 ----
  430. X      red = blue = green = 0;
  431. X  
  432. X      for (i = 2; i < 30; i++) {
  433. X!         red += 9;
  434. X!         set_colorentry(i, red, green, blue);
  435. X      }
  436. X!     set_colorentry(30, 255, 0, 0);      /* red */
  437. X      red = 255; blue = green = 0;
  438. X      for (i = 30; i < 62; i++) {
  439. X!         green += 6;
  440. X!         set_colorentry(i, red, green, blue);
  441. X      }
  442. X!     set_colorentry(62, 255, 188, 0);    /* orange */ /* note diff = 33 */
  443. X!     red = 255; blue = 0; green = 188;
  444. X      for (i = 63; i < 96; i++) {
  445. X!         green += 2;
  446. X!         set_colorentry(i, red, green, blue);
  447. X      }
  448. X!     set_colorentry(96, 255, 255, 0);    /* yellow */
  449. X      red = 255; blue = 0; green = 255;
  450. X      for (i = 97; i < 133; i++) {
  451. X!         red -= 7;
  452. X!         set_colorentry(i, red, green, blue);
  453. X      }
  454. X!     set_colorentry(133, 0, 255, 0);     /* green */
  455. X      red = blue = 0; green = 255;
  456. X      for (i = 134; i < 165; i++) {
  457. X!         green -= 8;
  458. X!         blue += 8;
  459. X!         set_colorentry(i, red, green, blue);
  460. X      }
  461. X!     set_colorentry(165, 0, 0, 255);     /* blue */
  462. X      red = green = 0; blue = 255;
  463. X      for (i = 165; i < 202; i++) {
  464. X!         red += 7;
  465. X!         set_colorentry(i, red, green, blue);
  466. X      }
  467. X!     set_colorentry(201, 255, 0, 255);   /* violet */
  468. X!     set_colorentry(202, 255, 0, 255);   /* violet */
  469. X      red = blue = 255; green = 0;
  470. X      for (i = 203; i < 239; i++) {
  471. X!         green += 7;
  472. X!         set_colorentry(i, red, green, blue);
  473. X      }
  474. X!     set_colorentry(239, 255, 255, 255); /* white */
  475. X      red = blue = green = 255;
  476. X      for (i = 239; i <= 255; i++) {
  477. X!         green -= 9;
  478. X!         red -= 9;
  479. X!         blue -= 9;
  480. X!         set_colorentry(i, red, green, blue);
  481. X      }
  482. X  }
  483. Xdiff -c ./color_palet.c ../../Ver2.3/source/color_palet.c
  484. X*** ./color_palet.c    Mon Jun 13 23:53:13 1988
  485. X--- ../../Ver2.3/source/color_palet.c    Fri Jun 17 00:27:06 1988
  486. X***************
  487. X*** 30,35 ****
  488. X--- 30,43 ----
  489. X          date:    Tue Mar 22 22:04:58 EST 1988
  490. X          author:    rayk
  491. X          changes:add comments
  492. X+ 
  493. X+         date:    Thu Jun 16 21:02:52 EDT 1988
  494. X+         author:    tnosoes!tom@mcvax.cwi.nl
  495. X+         changes:corrected problems with FRAME_INHERIT_COLOR
  496. X+             and the problem of the color table flashing
  497. X+             on and off when you move the mouse between
  498. X+             window.
  499. X+ 
  500. X  **************************************************************************/
  501. X  
  502. X  #include "header.h"
  503. X***************
  504. X*** 52,60 ****
  505. X   */
  506. X  set_mono()
  507. X  {
  508. X! /* set the color map to mono ******** */
  509. X!   cms_monochromeload(red,green,blue);
  510. X!   my_put_colormap();
  511. X    panel_set(color_button,PANEL_SHOW_ITEM, FALSE,0);
  512. X    panel_set(mono_cycle,PANEL_SHOW_ITEM, TRUE,0);
  513. X  }
  514. X--- 60,73 ----
  515. X   */
  516. X  set_mono()
  517. X  {
  518. X!   /*
  519. X!    * set the color map to mono
  520. X!    */
  521. X!   if ((pw->pw_pixrect->pr_depth) > 1)
  522. X!    {
  523. X!      cms_monochromeload(red,green,blue);
  524. X!      my_put_colormap();
  525. X!    }
  526. X    panel_set(color_button,PANEL_SHOW_ITEM, FALSE,0);
  527. X    panel_set(mono_cycle,PANEL_SHOW_ITEM, TRUE,0);
  528. X  }
  529. X***************
  530. X*** 78,83 ****
  531. X--- 91,97 ----
  532. X    bcopy(red,temp_red,256);
  533. X    bcopy(green,temp_green,256);
  534. X    bcopy(blue,temp_blue,256);
  535. X+ 
  536. X    temp_red[0] = -1;
  537. X    temp_green[0] = -1;
  538. X    temp_blue[0] = -1;
  539. X***************
  540. X*** 85,110 ****
  541. X    temp_green[1] = 0;
  542. X    temp_blue[1] = 0;
  543. X  
  544. X    temp_pw = (Pixwin *)window_get(panel, WIN_PIXWIN);
  545. X    pw_setcmsname(temp_pw, "ray kreisel");
  546. X!   pw_putcolormap(temp_pw, 0,256,red,green,blue);
  547. X  
  548. X    temp_pw = (Pixwin *)window_get(command_panel, WIN_PIXWIN);
  549. X    pw_setcmsname(temp_pw, "ray kreisel");
  550. X!   pw_putcolormap(temp_pw, 0,256,red,green,blue);
  551. X  
  552. X    temp_pw = (Pixwin *)window_get(region_panel, WIN_PIXWIN);
  553. X    pw_setcmsname(temp_pw, "ray kreisel");
  554. X!   pw_putcolormap(temp_pw, 0,256,red,green,blue);
  555. X  
  556. X    temp_pw = (Pixwin *)window_get(pattern_panel, WIN_PIXWIN);
  557. X    pw_setcmsname(temp_pw, "ray kreisel");
  558. X!   pw_putcolormap(temp_pw, 0,256,red,green,blue);
  559. X  
  560. X    temp_pw = (Pixwin *)window_get(brush_panel, WIN_PIXWIN);
  561. X    pw_setcmsname(temp_pw, "ray kreisel");
  562. X!   pw_putcolormap(temp_pw, 0,256,red,green,blue);
  563. X  
  564. X  }
  565. X  
  566. X  color_mode(item, event)
  567. X--- 99,150 ----
  568. X    temp_green[1] = 0;
  569. X    temp_blue[1] = 0;
  570. X  
  571. X+   temp_red[255] = 0;
  572. X+   temp_green[255] = 0;
  573. X+   temp_blue[255] = 0;
  574. X+   temp_red[254] = -1;
  575. X+   temp_green[254] = -1;
  576. X+   temp_blue[254] = -1;
  577. X+ 
  578. X+   temp_pw = (Pixwin *)window_get(base_frame, WIN_PIXWIN);
  579. X+   pw_setcmsname(temp_pw, "ray kreisel");
  580. X+   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  581. X+ 
  582. X    temp_pw = (Pixwin *)window_get(panel, WIN_PIXWIN);
  583. X    pw_setcmsname(temp_pw, "ray kreisel");
  584. X!   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  585. X  
  586. X    temp_pw = (Pixwin *)window_get(command_panel, WIN_PIXWIN);
  587. X    pw_setcmsname(temp_pw, "ray kreisel");
  588. X!   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  589. X  
  590. X    temp_pw = (Pixwin *)window_get(region_panel, WIN_PIXWIN);
  591. X    pw_setcmsname(temp_pw, "ray kreisel");
  592. X!   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  593. X  
  594. X    temp_pw = (Pixwin *)window_get(pattern_panel, WIN_PIXWIN);
  595. X    pw_setcmsname(temp_pw, "ray kreisel");
  596. X!   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  597. X  
  598. X    temp_pw = (Pixwin *)window_get(brush_panel, WIN_PIXWIN);
  599. X    pw_setcmsname(temp_pw, "ray kreisel");
  600. X!   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  601. X  
  602. X+   temp_pw = (Pixwin *)window_get(color_frame, WIN_PIXWIN);
  603. X+   pw_setcmsname(temp_pw, "ray kreisel");
  604. X+   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  605. X+ 
  606. X+   temp_pw = (Pixwin *)window_get(color_panel, WIN_PIXWIN);
  607. X+   pw_setcmsname(temp_pw, "ray kreisel");
  608. X+   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  609. X+ 
  610. X+   temp_pw = (Pixwin *)window_get(fat_frame, WIN_PIXWIN);
  611. X+   pw_setcmsname(temp_pw, "ray kreisel");
  612. X+   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  613. X+ 
  614. X+   temp_pw = (Pixwin *)window_get(fat_panel, WIN_PIXWIN);
  615. X+   pw_setcmsname(temp_pw, "ray kreisel");
  616. X+   pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  617. X  }
  618. X  
  619. X  color_mode(item, event)
  620. X***************
  621. X*** 150,162 ****
  622. X  Event   *event;
  623. X  caddr_t arg;
  624. X  {
  625. X!     if (event_is_up(event))
  626. X!        return;
  627. X!     switch (event_id(event)) {
  628. X!      case MS_LEFT:
  629. X!         update_cur_color(event_x(event),event_y(event),0);
  630. X!         break;
  631. X!     }
  632. X  }
  633. X  
  634. X  
  635. X--- 190,197 ----
  636. X  Event   *event;
  637. X  caddr_t arg;
  638. X  {
  639. X!     if (event_id(event) == MS_LEFT)
  640. X!     update_cur_color(event_x(event),event_y(event),0);
  641. X  }
  642. X  
  643. X  
  644. Xdiff -c ./command.c ../../Ver2.3/source/command.c
  645. X*** ./command.c    Mon Jun 13 23:53:14 1988
  646. X--- ../../Ver2.3/source/command.c    Fri Jun 17 00:27:08 1988
  647. X***************
  648. X*** 152,159 ****
  649. X  };
  650. X  static mpr_static(reg_command7_pr, 48, 48, 1, reg_command7_data);
  651. X  
  652. X- 
  653. X  static short reg_command8_data[] = {
  654. X  #include "move.cicon.pat"
  655. X  };
  656. X  static mpr_static(reg_command8_pr, 48, 48, 1, reg_command8_data);
  657. X--- 152,163 ----
  658. X  };
  659. X  static mpr_static(reg_command7_pr, 48, 48, 1, reg_command7_data);
  660. X  
  661. X  static short reg_command8_data[] = {
  662. X  #include "move.cicon.pat"
  663. X  };
  664. X  static mpr_static(reg_command8_pr, 48, 48, 1, reg_command8_data);
  665. X+ 
  666. X+ static short reg_command9_data[] = {
  667. X+ #include "scale.cicon.pat"
  668. X+ };
  669. X+ static mpr_static(reg_command9_pr, 48, 48, 1, reg_command9_data);
  670. Xdiff -c ./confirmer.c ../../Ver2.3/source/confirmer.c
  671. X*** ./confirmer.c    Mon Jun 13 23:53:16 1988
  672. X--- ../../Ver2.3/source/confirmer.c    Fri Jun 17 00:27:09 1988
  673. X***************
  674. X*** 28,50 ****
  675. X          date:    Tue Mar 22 22:04:58 EST 1988
  676. X          author:    rayk
  677. X          changes:add comments
  678. X- **************************************************************************/
  679. X  
  680. X! #include <stdio.h>
  681. X! #include <sys/file.h>
  682. X! #include <suntool/sunview.h>
  683. X! #include <suntool/panel.h>
  684. X! #include <suntool/canvas.h>
  685. X! #include <suntool/walkmenu.h>
  686. X! #include <suntool/scrollbar.h>
  687. X! #include <math.h>
  688. X! #include <pixrect/pixrect_hs.h>
  689. X  
  690. X- extern Panel panel;
  691. X  
  692. X! static Frame  init_confirmer();
  693. X! static void yes_no();
  694. X  
  695. X  /***************************************************************
  696. X          confirm
  697. X          purpose: To display a window on the base_frame Sunwindow
  698. X--- 28,45 ----
  699. X          date:    Tue Mar 22 22:04:58 EST 1988
  700. X          author:    rayk
  701. X          changes:add comments
  702. X  
  703. X!         date:    Sun May 15 21:21:01 EDT 1988
  704. X!         author:    rayk
  705. X!         changes:rewrote the confirmer so that it is NOT created
  706. X!             dynamiclly to try to advoid the error in the
  707. X!             window creation (no more file descriptors)
  708. X  
  709. X  
  710. X! **************************************************************************/
  711. X  
  712. X+ #include "header.h"
  713. X+ 
  714. X  /***************************************************************
  715. X          confirm
  716. X          purpose: To display a window on the base_frame Sunwindow
  717. X***************
  718. X*** 56,164 ****
  719. X          1 : if the user answered YES
  720. X          0 : if the user answered NO
  721. X   ***************************************************************/
  722. X  int confirm(message)
  723. X  char     *message; 
  724. X  {
  725. X!     Frame     confirmer;
  726. X!     int       answer;
  727. X  
  728. X- /* create the confirmer */
  729. X-     confirmer = init_confirmer(message);
  730. X-     window_bell(panel);
  731. X- /* make the user answer */
  732. X-      answer = (int) window_loop(confirmer);
  733. X  
  734. X! /* destroy the confirmer */
  735. X!     window_set(confirmer, FRAME_NO_CONFIRM, TRUE, 0);
  736. X!     window_destroy(confirmer);
  737. X! 
  738. X!         return answer;
  739. X  }
  740. X  
  741. X- static Frame
  742. X- init_confirmer(message)
  743. X- char     *message; 
  744. X- { 
  745. X- extern   Frame  base_frame;
  746. X- Frame           confirmer;
  747. X- Panel           panel;
  748. X- Panel_item      message_item;
  749. X- int             left, top, width, height;
  750. X- Rect            *r;
  751. X- struct pixrect  *pr;
  752. X  
  753. X- /* create the confirmer base frame */
  754. X-     confirmer = window_create(base_frame, FRAME, 
  755. X-                                   FRAME_SHOW_LABEL, FALSE,
  756. X-                   0);
  757. X  
  758. X! /* create the single panel subwindow */
  759. X!     panel = window_create(confirmer, PANEL, 0);
  760. X! 
  761. X! /* put in the message */
  762. X!     message_item = panel_create_item(panel, PANEL_MESSAGE,
  763. X!                     PANEL_LABEL_STRING, message,
  764. X!                     0);
  765. X! 
  766. X!     pr = panel_button_image(panel, "NO", 3, 0);
  767. X!     width = 2 * pr->pr_width + 10;
  768. X! 
  769. X!       r = (Rect *) panel_get(message_item, PANEL_ITEM_RECT);
  770. X! 
  771. X! /* center the yes/no buttons under the message */
  772. X!     left = (r->r_width - width) / 2;
  773. X!     if (left < 0)
  774. X!         left = 0;
  775. X!     top = rect_bottom(r) + 5;
  776. X! 
  777. X!         panel_create_item(panel, PANEL_BUTTON,
  778. X!                   PANEL_ITEM_X, left,
  779. X!               PANEL_ITEM_Y, top,
  780. X!               PANEL_LABEL_IMAGE, pr,
  781. X!               PANEL_CLIENT_DATA, FALSE,
  782. X!           PANEL_NOTIFY_PROC, yes_no,
  783. X!           0);
  784. X!  
  785. X!         panel_create_item(panel, PANEL_BUTTON,
  786. X!               PANEL_LABEL_IMAGE, panel_button_image(panel, "YES", 3, 0),
  787. X!               PANEL_CLIENT_DATA, TRUE,
  788. X!           PANEL_NOTIFY_PROC, yes_no,
  789. X!           0);
  790. X!  
  791. X! 
  792. X!     window_fit(panel);
  793. X!     window_fit(confirmer);
  794. X! 
  795. X! /* center the confirmer frame in the base frame */
  796. X!     r = (Rect *) window_get(base_frame, WIN_RECT);
  797. X! 
  798. X!     width = (int) window_get(confirmer, WIN_WIDTH);
  799. X!     height = (int) window_get(confirmer, WIN_HEIGHT);
  800. X! 
  801. X!     left = (r->r_width - width) / 2;
  802. X!     top = (r->r_height - height) / 3;
  803. X! 
  804. X!         if (left < 0) 
  805. X!             left = 0; 
  806. X!      if (top < 0)
  807. X!         top = 0;
  808. X! 
  809. X!     window_set(confirmer, WIN_X, left, WIN_Y, top,
  810. X!             0);
  811. X! 
  812. X!         left = left + (width - width/3);
  813. X!         top = top + height / 2;      
  814. X!     window_set(base_frame, WIN_MOUSE_XY, left, top,  0);
  815. X! 
  816. X!     return confirmer;
  817. X! }
  818. X! 
  819. X! /* yes/no notify proc */
  820. X! static void
  821. X! yes_no(item, event)
  822. X  Panel_item   item;
  823. X  Event        *event;
  824. X  {
  825. X!     window_return(panel_get(item, PANEL_CLIENT_DATA));
  826. X  }
  827. X- 
  828. X--- 51,94 ----
  829. X          1 : if the user answered YES
  830. X          0 : if the user answered NO
  831. X   ***************************************************************/
  832. X+ extern Panel_item con_msg_string;
  833. X+ 
  834. X  int confirm(message)
  835. X  char     *message; 
  836. X  {
  837. X!    window_bell(panel);
  838. X!    confirm_msg(message);
  839. X!    return((int)window_loop(confirmer));
  840. X! }
  841. X  
  842. X  
  843. X! confirm_msg(string)
  844. X! char *string;
  845. X! {
  846. X! char temp_space[55];
  847. X! char *temp_pt;
  848. X! int i;
  849. X!   
  850. X!   if (strlen(string) < 50)
  851. X!   {
  852. X!     for(i=0;i<50;i++)
  853. X!       temp_space[i]= ' ';
  854. X!     temp_pt = temp_space + (50-strlen(string))/2;
  855. X!     strcpy(temp_pt,string);
  856. X!     panel_set(con_msg_string,PANEL_LABEL_STRING,temp_space,0);
  857. X!   }
  858. X!   else
  859. X!     panel_set(con_msg_string,PANEL_LABEL_STRING,string,0);
  860. X  }
  861. X  
  862. X  
  863. X  
  864. X! /*
  865. X!  * yes/no notify proc 
  866. X!  */
  867. X! void yes_no(item, event)
  868. X  Panel_item   item;
  869. X  Event        *event;
  870. X  {
  871. X!         window_return(panel_get(item, PANEL_CLIENT_DATA));
  872. X  }
  873. Xdiff -c ./disk_io.c ../../Ver2.3/source/disk_io.c
  874. X*** ./disk_io.c    Mon Jun 13 23:53:19 1988
  875. X--- ../../Ver2.3/source/disk_io.c    Fri Jun 17 00:27:12 1988
  876. X***************
  877. X*** 30,35 ****
  878. X--- 30,54 ----
  879. X          date:    Tue Mar 22 22:04:58 EST 1988
  880. X          author:    rayk
  881. X          changes:add comments
  882. X+ 
  883. X+         date:    Thu Apr 21 20:14:58 EDT 1988
  884. X+         author:    rayk
  885. X+         changes:when you hit return in filename the caret moves
  886. X+             to textstring
  887. X+ 
  888. X+         date:    Thu Apr 21 20:14:58 EDT 1988
  889. X+         author:    rayk
  890. X+         changes:when you do a load cut/paste buffer it will
  891. X+             automagicly bring up the cut/paste command menu
  892. X+ 
  893. X+         date:    Wed Jun 1 1:22:18 EDT 1988
  894. X+         author:    rayk
  895. X+         changes:fixed bug in resize color canvases
  896. X+ 
  897. X+         date:    Wed Jun 15 14:40:48 EDT 1988
  898. X+         author:    rayk
  899. X+         changes:added a check in file save to check is the
  900. X+             current filename is a directory
  901. X  **************************************************************************/
  902. X  
  903. X  #include "header.h"
  904. X***************
  905. X*** 38,43 ****
  906. X--- 57,63 ----
  907. X  #include <sys/dir.h>
  908. X  #include <sys/file.h>
  909. X  #include <pwd.h>
  910. X+ #include <sys/stat.h>
  911. X  
  912. X  colormap_t colormap;
  913. X  
  914. X***************
  915. X*** 48,57 ****
  916. X  Panel_item      item;
  917. X  Event           *event;
  918. X  {
  919. X!   strcpy(file_name,(char*)panel_get_value(file_panel));
  920. X!   if (complete(file_name))
  921. X!       window_bell(panel);
  922. X!   panel_set(file_panel,PANEL_VALUE,file_name,0);
  923. X  }
  924. X  
  925. X  
  926. X--- 68,87 ----
  927. X  Panel_item      item;
  928. X  Event           *event;
  929. X  {
  930. X!   if (item == text_panel)
  931. X!     window_set(panel,PANEL_CARET_ITEM,file_panel,0);
  932. X!   else
  933. X!   {
  934. X!       if ((char)event_id(event) == '\r')
  935. X!         window_set(panel,PANEL_CARET_ITEM,text_panel,0);
  936. X!       else
  937. X!       {
  938. X!         strcpy(file_name,(char*)panel_get_value(file_panel));
  939. X!         if (complete(file_name))
  940. X!             window_bell(panel);
  941. X!         panel_set(file_panel,PANEL_VALUE,file_name,0);
  942. X!       }
  943. X!   }
  944. X  }
  945. X  
  946. X  
  947. X***************
  948. X*** 388,393 ****
  949. X--- 418,428 ----
  950. X         {
  951. X      my_put_colormap();
  952. X      set_color();
  953. X+ /**** new fix for color retained canvases */
  954. X+         (void)window_set(canvas,
  955. X+         CANVAS_WIDTH,        file_header.ras_width,
  956. X+         CANVAS_HEIGHT,        file_header.ras_height,
  957. X+         0);
  958. X         }
  959. X       else
  960. X         {
  961. X***************
  962. X*** 402,407 ****
  963. X--- 437,446 ----
  964. X       image_hgt = file_header.ras_height;
  965. X       image_depth = file_header.ras_depth;
  966. X       pw_write(pw,0,0, image_wid,image_hgt, PIX_SRC, undo_pr,0,0);
  967. X+      sprintf(temp_file,"%d",image_hgt);
  968. X+      panel_set(height_text,PANEL_VALUE,temp_file,0);
  969. X+      sprintf(temp_file,"%d",image_wid);
  970. X+      panel_set(width_text,PANEL_VALUE,temp_file,0);
  971. X      }
  972. X    else
  973. X      {
  974. X***************
  975. X*** 414,419 ****
  976. X--- 453,464 ----
  977. X              PIX_SRC,undo_pr,0,0);
  978. X      MY_pr_destroy(undo_pr);
  979. X      undo_pr = my_mem_create(image_wid,image_hgt,image_depth);
  980. X+     panel_set(region_choice,PANEL_VALUE,MOVE,0);
  981. X+     panel_set(command_choice,PANEL_VALUE,SEL_REG,0);
  982. X+     (void)window_set(brush_panel, WIN_SHOW,FALSE, 0);
  983. X+     (void)window_set(region_panel, WIN_SHOW,TRUE, 0);
  984. X+     print_msg("Object copied to Cut/Paste buffer. Hold down the RIGHT mouse button to drag the object.");
  985. X+     mouse_parms();
  986. X      }
  987. X  }
  988. X  
  989. X***************
  990. X*** 432,437 ****
  991. X--- 477,483 ----
  992. X  int copy_flag = TRUE;
  993. X  char temp_file[MAX_FILE_NAME];
  994. X  
  995. X+  hide_msg();
  996. X   /*
  997. X    * Is the raster file to be run-length encode or not
  998. X    */
  999. X***************
  1000. X*** 445,453 ****
  1001. X     */
  1002. X   strcpy(temp_file,(char*)panel_get_value(file_panel));
  1003. X   get_full_path(temp_file,file_name);
  1004. X   if (file_exist(file_name))
  1005. X      {
  1006. X!          if (!confirm("Over write existing file ?"))
  1007. X       return(0);
  1008. X      }
  1009. X   /*
  1010. X--- 491,506 ----
  1011. X     */
  1012. X   strcpy(temp_file,(char*)panel_get_value(file_panel));
  1013. X   get_full_path(temp_file,file_name);
  1014. X+ 
  1015. X+  if (file_is_dir(file_name))
  1016. X+     {
  1017. X+          ERROR("The current filename is a directory !");
  1018. X+      return(0);
  1019. X+     }
  1020. X+ 
  1021. X   if (file_exist(file_name))
  1022. X      {
  1023. X!          if (!confirm("Overwrite existing file ?"))
  1024. X       return(0);
  1025. X      }
  1026. X   /*
  1027. X***************
  1028. X*** 461,467 ****
  1029. X       return(0);
  1030. X      }
  1031. X   /*
  1032. X!   * Save the whole drawing are out to the disk file
  1033. X    */
  1034. X   if (SAVE_ALL == (int)panel_get_value(save_cycle))
  1035. X     {
  1036. X--- 514,520 ----
  1037. X       return(0);
  1038. X      }
  1039. X   /*
  1040. X!   * Save the whole drawing area out to the disk file
  1041. X    */
  1042. X   if (SAVE_ALL == (int)panel_get_value(save_cycle))
  1043. X     {
  1044. X***************
  1045. X*** 471,477 ****
  1046. X       save_screen();
  1047. X  
  1048. X       if (!undo_pr)
  1049. X!     undo_pr = my_mem_create(image_wid,image_hgt,image_depth);
  1050. X       pr_rop(undo_pr,0,0,image_wid,image_hgt,PIX_SRC,pw->pw_prretained,0,0);
  1051. X       pr_dump(undo_pr,fp,&colormap,type,copy_flag);
  1052. X     }
  1053. X--- 524,530 ----
  1054. X       save_screen();
  1055. X  
  1056. X       if (!undo_pr)
  1057. X!         undo_pr = my_mem_create(image_wid,image_hgt,image_depth);
  1058. X       pr_rop(undo_pr,0,0,image_wid,image_hgt,PIX_SRC,pw->pw_prretained,0,0);
  1059. X       pr_dump(undo_pr,fp,&colormap,type,copy_flag);
  1060. X     }
  1061. X***************
  1062. X*** 505,510 ****
  1063. X--- 558,584 ----
  1064. X      return(TRUE);
  1065. X    else
  1066. X      return(FALSE);
  1067. X+ }
  1068. X+ 
  1069. X+ 
  1070. X+ /*
  1071. X+  * Check if the file is a directory
  1072. X+  */
  1073. X+ file_is_dir(file_name)
  1074. X+ char *file_name;
  1075. X+ {
  1076. X+ struct stat buf;
  1077. X+ 
  1078. X+   if (file_exist(file_name))
  1079. X+   {
  1080. X+     stat(file_name,&buf);
  1081. X+     if (buf.st_mode & S_IFDIR)
  1082. X+     return(TRUE);
  1083. X+     else
  1084. X+     return(FALSE);
  1085. X+   }
  1086. X+   else
  1087. X+       return(FALSE);
  1088. X  }
  1089. X  
  1090. X  
  1091. Xdiff -c ./drawing.c ../../Ver2.3/source/drawing.c
  1092. X*** ./drawing.c    Mon Jun 13 23:53:22 1988
  1093. X--- ../../Ver2.3/source/drawing.c    Fri Jun 17 00:27:15 1988
  1094. X***************
  1095. X*** 30,35 ****
  1096. X--- 30,63 ----
  1097. X          date:    Tue Mar 22 22:04:58 EST 1988
  1098. X          author:    rayk
  1099. X          changes:add comments
  1100. X+ 
  1101. X+         date:    Fri Apr 15 02:08:11 EDT 1988
  1102. X+         author:    rayk
  1103. X+         changes:added scale cut/paste
  1104. X+ 
  1105. X+         date:    Tue Apr 19 14:05:10 EDT 1988
  1106. X+         author:    rayk
  1107. X+         changes:fixed no-borders on polygons
  1108. X+ 
  1109. X+         date:    Fri Apr 22 03:05:28 EDT 1988
  1110. X+         author:    rainbow
  1111. X+         changes:added FAST rotate
  1112. X+ 
  1113. X+         date:    Fri Apr 22 17:11:02 EDT 1988
  1114. X+         author:    rayk
  1115. X+         changes:added pw_batch to make things much FASTER
  1116. X+ 
  1117. X+         date:    Wed Jun 15 14:40:48 EDT 1988
  1118. X+         author:    juang@aloft.att.com
  1119. X+         changes:worked around bug in pw_stencil that
  1120. X+             would not display color paint brushes properly
  1121. X+             on Sun 3/160 & Sun 3/260
  1122. X+ 
  1123. X+         date:    Wed Jun 15 16:49:43 EDT 1988
  1124. X+         author:    rayk
  1125. X+         changes:added toggle to make it so that
  1126. X+             lasso will clear the area that has been selected
  1127. X+ 
  1128. X  **************************************************************************/
  1129. X  
  1130. X  #include"header.h"
  1131. X***************
  1132. X*** 85,109 ****
  1133. X   * Take the current text string and put that Baby up on the bitmap
  1134. X   * in the right font
  1135. X   */
  1136. X! draw_text()
  1137. X  {
  1138. X! int x,y;
  1139. X! 
  1140. X!   if (select_pt_x != -1)
  1141. X!     {
  1142. X!       x = select_pt_x;
  1143. X!       y = select_pt_y;
  1144. X!       clean_point();
  1145. X!       save_screen();
  1146. X!       pw_text(pw,x,y,PIX_COLOR(cur_color) | PIX_SRC,font_array[(int)panel_get_value(text_size_item)],
  1147. X          (char*)panel_get_value(text_panel));
  1148. X-     }
  1149. X-   else
  1150. X-     {
  1151. X-       ERROR("Select a point first, fill in TEXT STRING, then select ABC.");
  1152. X-       window_set(panel,PANEL_CARET_ITEM,text_panel,0);
  1153. X-       set_select_mode();
  1154. X-     }
  1155. X  }
  1156. X  
  1157. X  
  1158. X--- 113,123 ----
  1159. X   * Take the current text string and put that Baby up on the bitmap
  1160. X   * in the right font
  1161. X   */
  1162. X! draw_text(x,y,ROP)
  1163. X! int x,y,ROP;
  1164. X  {
  1165. X!       pw_text(pw,x,y,PIX_COLOR(cur_color) | ROP,font_array[(int)panel_get_value(text_size_item)],
  1166. X          (char*)panel_get_value(text_panel));
  1167. X  }
  1168. X  
  1169. X  
  1170. X***************
  1171. X*** 123,128 ****
  1172. X--- 137,144 ----
  1173. X  draw_rectangle(x1,y1,x2,y2)
  1174. X  int x1,y1,x2,y2;
  1175. X  {
  1176. X+ int ROP;
  1177. X+ 
  1178. X    top_x = x1;
  1179. X    top_y = y1;
  1180. X    bottom_x = x2;
  1181. X***************
  1182. X*** 131,142 ****
  1183. X      fill_region();
  1184. X    else
  1185. X      reset_region();
  1186. X!   if ((int)panel_get_value(border_cycle))
  1187. X    {
  1188. X!     pw_vector(pw,x1,y1,x2,y1,PIX_SRC,cur_color);
  1189. X!     pw_vector(pw,x2,y1,x2,y2,PIX_SRC,cur_color);
  1190. X!     pw_vector(pw,x2,y2,x1,y2,PIX_SRC,cur_color);
  1191. X!     pw_vector(pw,x1,y2,x1,y1,PIX_SRC,cur_color);
  1192. X    }
  1193. X  }
  1194. X  
  1195. X--- 147,162 ----
  1196. X      fill_region();
  1197. X    else
  1198. X      reset_region();
  1199. X!   if (!(ROP = get_current_ROP()))
  1200. X!       ROP = PIX_SRC;
  1201. X!   if (((( (int)panel_get_value(border_cycle))
  1202. X!        || (int)panel_get_value(command_choice)==RECT_H))
  1203. X!        && (ROP != (PIX_XOR)))
  1204. X    {
  1205. X!     pw_vector(pw,x1,y1,x2,y1,ROP,cur_color);
  1206. X!     pw_vector(pw,x2,y1,x2,y2,ROP,cur_color);
  1207. X!     pw_vector(pw,x2,y2,x1,y2,ROP,cur_color);
  1208. X!     pw_vector(pw,x1,y2,x1,y1,ROP,cur_color);
  1209. X    }
  1210. X  }
  1211. X  
  1212. X***************
  1213. X*** 187,220 ****
  1214. X  struct pixwin *pw;
  1215. X  int x,y;
  1216. X  {
  1217. X    if (brush_temp_pr == NULL)
  1218. X!     brush_temp_pr = my_mem_create(PATTERN_SIZE,PATTERN_SIZE,1);
  1219. X  
  1220. X  
  1221. X    if (((int)panel_get_value(pattern_choice) != 39) || (image_depth == 1))
  1222. X    {
  1223. X!     if (brush_temp_pr->pr_depth != 1)
  1224. X!     {
  1225. X!          MY_pr_destroy(brush_temp_pr);
  1226. X!         brush_temp_pr = my_mem_create(PATTERN_SIZE,PATTERN_SIZE,1);
  1227. X!     }
  1228. X!     pr_replrop(brush_temp_pr,0,0,PATTERN_SIZE,PATTERN_SIZE, PIX_SRC,pattern[(int)panel_get_value(pattern_choice)],x,y);
  1229. X!         pw_stencil(pw,x-PATTERN_SIZE/2,y-PATTERN_SIZE/2,PATTERN_SIZE,PATTERN_SIZE,PIX_COLOR(cur_color) | PIX_SRC,
  1230. X!     brushes[(int)panel_get_value(brush_choice)],0,0,brush_temp_pr,0,0);
  1231. X    }
  1232. X    else
  1233. X    {
  1234. X!     if (brush_temp_pr->pr_depth != image_depth)
  1235. X!     {
  1236. X!          MY_pr_destroy(brush_temp_pr);
  1237. X!         brush_temp_pr = my_mem_create(PATTERN_SIZE,PATTERN_SIZE,image_depth);
  1238. X!     }
  1239. X!     pr_replrop(brush_temp_pr,0,0,PATTERN_SIZE,PATTERN_SIZE, PIX_SRC,pattern[(int)panel_get_value(pattern_choice)],x,y);
  1240. X!         pw_stencil(pw,x-PATTERN_SIZE/2,y-PATTERN_SIZE/2,PATTERN_SIZE,PATTERN_SIZE, PIX_SRC,
  1241. X!     brushes[(int)panel_get_value(brush_choice)],0,0,brush_temp_pr,0,0);
  1242. X! 
  1243. X    }
  1244. X  
  1245. X  }
  1246. X  
  1247. X  
  1248. X--- 207,237 ----
  1249. X  struct pixwin *pw;
  1250. X  int x,y;
  1251. X  {
  1252. X+ int ROP;
  1253. X+ 
  1254. X+   if (!(ROP = get_current_ROP()))
  1255. X+     ROP = PIX_SRC;
  1256. X+ 
  1257. X    if (brush_temp_pr == NULL)
  1258. X!     brush_temp_pr = my_mem_create(PATTERN_SIZE,PATTERN_SIZE,image_depth);
  1259. X  
  1260. X+   if (brush_temp_pr->pr_depth != image_depth)
  1261. X+   {
  1262. X+         MY_pr_destroy(brush_temp_pr);
  1263. X+         brush_temp_pr = my_mem_create(PATTERN_SIZE,PATTERN_SIZE,image_depth);
  1264. X+   }
  1265. X  
  1266. X    if (((int)panel_get_value(pattern_choice) != 39) || (image_depth == 1))
  1267. X    {
  1268. X!         pr_replrop(brush_temp_pr,0,0,PATTERN_SIZE,PATTERN_SIZE, PIX_COLOR(cur_color) | PIX_SRC,pattern[(int)panel_get_value(pattern_choice)],x,y);
  1269. X    }
  1270. X    else
  1271. X    {
  1272. X!         pr_replrop(brush_temp_pr,0,0,PATTERN_SIZE,PATTERN_SIZE, PIX_SRC,pattern[(int)panel_get_value(pattern_choice)],x,y);
  1273. X    }
  1274. X  
  1275. X+   pw_stencil(pw,x-PATTERN_SIZE/2,y-PATTERN_SIZE/2,PATTERN_SIZE,PATTERN_SIZE,
  1276. X+   ROP, brushes[(int)panel_get_value(brush_choice)],0,0,brush_temp_pr,0,0);
  1277. X  }
  1278. X  
  1279. X  
  1280. X***************
  1281. X*** 247,256 ****
  1282. X--- 264,275 ----
  1283. X  struct pixwin *pw;
  1284. X  int x,y;
  1285. X  {
  1286. X+   pw_batch_on(pw);
  1287. X    select_region(pw,top_x,top_y,top_x+PATTERN_SIZE,top_y+PATTERN_SIZE);
  1288. X    pw_rop(pw,x-PATTERN_SIZE/2,y-PATTERN_SIZE/2,PATTERN_SIZE,PATTERN_SIZE, PIX_SRC,0,0,0);
  1289. X    top_x = x-PATTERN_SIZE/2; top_y= y-PATTERN_SIZE/2;
  1290. X    select_region(pw,top_x,top_y,top_x+PATTERN_SIZE,top_y+PATTERN_SIZE);
  1291. X+   pw_batch_off(pw);
  1292. X  }
  1293. X  
  1294. X  
  1295. X***************
  1296. X*** 300,329 ****
  1297. X  
  1298. X  /*
  1299. X   * take a currently selected region and rotate around the center
  1300. X!  * point.  SLOW !!
  1301. X   */
  1302. X  rotate_region()
  1303. X  {
  1304. X! register i,j,t1,t2;
  1305. X  
  1306. X    if (top_x || top_y || bottom_x || bottom_y)
  1307. X      {
  1308. X       select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1309. X       region_fix();
  1310. X!      MY_pr_destroy(cut_buffer_pr);
  1311. X!      cut_buffer_pr = my_mem_create(bottom_x-top_x,bottom_y-top_y,image_depth);
  1312. X!      pr_rop(cut_buffer_pr,0,0,bottom_x-top_x,bottom_y-top_y,
  1313. X!         PIX_SRC,pw->pw_prretained,top_x,top_y);
  1314. X!      t1 = top_x + cut_buffer_pr->pr_size.x/2+ cut_buffer_pr->pr_size.y/2;
  1315. X!      t2 = top_y - cut_buffer_pr->pr_size.x/2+ cut_buffer_pr->pr_size.y/2;
  1316. X!      for (j = 0; j < cut_buffer_pr->pr_size.y; j++)
  1317. X!        for (i = 0; i < cut_buffer_pr->pr_size.x; i++)
  1318. X!         pw_rop(pw, t1-j, t2+i, 1,1, PIX_SRC, cut_buffer_pr,i,j);
  1319. X  
  1320. X!      top_x = top_x + cut_buffer_pr->pr_size.x/2 - cut_buffer_pr->pr_size.y/2;
  1321. X!      top_y = top_y - cut_buffer_pr->pr_size.x/2 + cut_buffer_pr->pr_size.y/2;
  1322. X!      bottom_x = top_x + cut_buffer_pr->pr_size.y;
  1323. X!      bottom_y = top_y + cut_buffer_pr->pr_size.x;
  1324. X       select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1325. X      }
  1326. X    else
  1327. X--- 319,365 ----
  1328. X  
  1329. X  /*
  1330. X   * take a currently selected region and rotate around the center
  1331. X!  * point.  New FAST version that rotates in 3n bitblt where n is
  1332. X!  * number of raster lines in the source
  1333. X   */
  1334. X  rotate_region()
  1335. X  {
  1336. X! int    i, width, height, new_x, new_y, y1, y2, n;
  1337. X! struct pixrect    *tmp1, *tmp2;
  1338. X  
  1339. X    if (top_x || top_y || bottom_x || bottom_y)
  1340. X      {
  1341. X       select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1342. X       region_fix();
  1343. X!      width = bottom_x - top_x;
  1344. X!      height = bottom_y - top_y;
  1345. X!      new_x = top_x + (width - height) / 2;
  1346. X!      new_y = top_y + (height - width ) /2;
  1347. X!      tmp1 = my_mem_create(width+height-1, height, image_depth);
  1348. X!      tmp2 = my_mem_create(width+height-1, width, image_depth);
  1349. X  
  1350. X!      for(i=0; i<height; i++)
  1351. X!        pr_rop(tmp1, i, i, width, 1, PIX_SRC, pw->pw_prretained, top_x, top_y+i);
  1352. X! 
  1353. X!      for(i=0; i<=width+height-1; i++)
  1354. X!         {
  1355. X!        n = (i+1<height) ? i+1 : ((i>=width) ? (width+height-1-i) : height);
  1356. X!            y1 = (i<width) ? (width-1-i) : 0;
  1357. X!            y2 = (i>=width) ? (i-width+1) : 0;
  1358. X!            pr_rop(tmp2, i, y1, 1, n, PIX_SRC, tmp1, i, y2);
  1359. X!         }
  1360. X! 
  1361. X!      pw_batch_on(pw);
  1362. X!      for(i=0; i<width; i++)
  1363. X!        pw_rop(pw, new_x, new_y+i, height, 1, PIX_SRC, tmp2, width-1-i, i);
  1364. X!      pw_batch_off(pw);
  1365. X!      MY_pr_destroy(tmp1);
  1366. X!      MY_pr_destroy(tmp2);
  1367. X! 
  1368. X!      top_x = new_x;
  1369. X!      top_y = new_y;
  1370. X!      bottom_x = new_x+height;
  1371. X!      bottom_y = new_y+width;
  1372. X       select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1373. X      }
  1374. X    else
  1375. X***************
  1376. X*** 350,360 ****
  1377. X--- 386,398 ----
  1378. X       cut_buffer_pr = my_mem_create(bottom_x-top_x,bottom_y-top_y,image_depth);
  1379. X       pr_rop(cut_buffer_pr,0,0,bottom_x-top_x,bottom_y-top_y,
  1380. X          PIX_SRC,pw->pw_prretained,top_x,top_y);
  1381. X+      pw_batch_on(pw);
  1382. X       for (i = 0; i < cut_buffer_pr->pr_size.x; i++) {
  1383. X          pw_rop(pw, top_x+(cut_buffer_pr->pr_size.x - i)-1,top_y,
  1384. X              1,cut_buffer_pr->pr_size.y, PIX_SRC, cut_buffer_pr,i,0);
  1385. X      }
  1386. X       select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1387. X+      pw_batch_off(pw);
  1388. X      }
  1389. X    else
  1390. X      {
  1391. X***************
  1392. X*** 377,382 ****
  1393. X--- 415,421 ----
  1394. X       region_fix();
  1395. X       MY_pr_destroy(cut_buffer_pr);
  1396. X       cut_buffer_pr = my_mem_create(bottom_x-top_x,bottom_y-top_y,image_depth);
  1397. X+      pw_batch_on(pw);
  1398. X       pr_rop(cut_buffer_pr,0,0,bottom_x-top_x,bottom_y-top_y,
  1399. X          PIX_SRC,pw->pw_prretained,top_x,top_y);
  1400. X       for (i = 0; i < cut_buffer_pr->pr_size.y; i++) {
  1401. X***************
  1402. X*** 384,389 ****
  1403. X--- 423,429 ----
  1404. X              cut_buffer_pr->pr_size.x, 1, PIX_SRC, cut_buffer_pr, 0, i);
  1405. X      }
  1406. X       select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1407. X+      pw_batch_off(pw);
  1408. X      }
  1409. X    else
  1410. X      {
  1411. X***************
  1412. X*** 394,406 ****
  1413. X  }
  1414. X  
  1415. X  
  1416. X  
  1417. X  /*
  1418. X   * grab what is in the Cut/Paste buffer and put it up on the drawing area
  1419. X   */
  1420. X  paste_region()
  1421. X  {
  1422. X! int ROP=PIX_SRC;
  1423. X  
  1424. X    if (select_pt_x == -1)
  1425. X       {
  1426. X--- 434,490 ----
  1427. X  }
  1428. X  
  1429. X  
  1430. X+ /*
  1431. X+  * take a current Cut/Paste and scale it
  1432. X+  */
  1433. X+ scale_region()
  1434. X+ {
  1435. X+ int ROP;
  1436. X+ float inc,count;
  1437. X+ register line;
  1438. X+ struct pixrect  *temp_pix;
  1439. X  
  1440. X+   if ((top_x || top_y || bottom_x || bottom_y) && cut_buffer_pr)
  1441. X+     {
  1442. X+      if (!(ROP = get_current_ROP()))
  1443. X+     ROP = PIX_SRC;
  1444. X+      select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1445. X+      region_fix();
  1446. X+ 
  1447. X+      temp_pix = my_mem_create(cut_buffer_pr->pr_size.x,bottom_y-top_y,image_depth);
  1448. X+      inc = ((float)cut_buffer_pr->pr_size.y)/(float)(bottom_y-top_y);
  1449. X+      for (count = 0.0,line = 0; count < cut_buffer_pr->pr_size.y ; count +=inc, line++)
  1450. X+         {
  1451. X+        pr_rop(temp_pix,0,line,
  1452. X+          cut_buffer_pr->pr_size.x, 1, ROP, cut_buffer_pr, 0, (int)count);
  1453. X+     }
  1454. X+      inc = ((float)cut_buffer_pr->pr_size.x)/(float)(bottom_x-top_x);
  1455. X+      pw_batch_on(pw);
  1456. X+      for (count = 0.0, line = 0; count < cut_buffer_pr->pr_size.x;  count +=inc, line++)
  1457. X+         {
  1458. X+         pw_rop(pw,top_x + line,top_y,
  1459. X+         1,temp_pix->pr_size.y, ROP,temp_pix,(int)count,0);
  1460. X+     }
  1461. X+      pw_batch_off(pw);
  1462. X+      reset_region();
  1463. X+      MY_pr_destroy(temp_pix);
  1464. X+     }
  1465. X+   else
  1466. X+     {
  1467. X+      ERROR("Select a destination region first, then select SCALE.");
  1468. X+      panel_set(command_choice,PANEL_VALUE,SEL_REG,0);
  1469. X+      mouse_parms();
  1470. X+     }
  1471. X+ }
  1472. X+ 
  1473. X+ 
  1474. X+ 
  1475. X  /*
  1476. X   * grab what is in the Cut/Paste buffer and put it up on the drawing area
  1477. X   */
  1478. X  paste_region()
  1479. X  {
  1480. X! int ROP;
  1481. X  
  1482. X    if (select_pt_x == -1)
  1483. X       {
  1484. X***************
  1485. X*** 410,415 ****
  1486. X--- 494,501 ----
  1487. X       }
  1488. X    if (cut_buffer_pr)
  1489. X    {
  1490. X+      if (!(ROP = get_current_ROP()))
  1491. X+     ROP = PIX_SRC;
  1492. X       select_point(select_pt_x,select_pt_y);
  1493. X       save_screen();
  1494. X       pw_write(pw,select_pt_x,select_pt_y,cut_buffer_pr->pr_size.x,cut_buffer_pr->pr_size.y, ROP, cut_buffer_pr,0,0);
  1495. X***************
  1496. X*** 487,492 ****
  1497. X--- 573,579 ----
  1498. X  {
  1499. X    if (cut_buffer_pr)
  1500. X      {
  1501. X+      pw_batch_on(pw);
  1502. X       pw_write(pw,old_x-cut_buffer_pr->pr_size.x/2,
  1503. X           old_y-cut_buffer_pr->pr_size.y/2,
  1504. X           cut_buffer_pr->pr_size.x,
  1505. X***************
  1506. X*** 498,503 ****
  1507. X--- 585,591 ----
  1508. X           cut_buffer_pr->pr_size.x,
  1509. X           cut_buffer_pr->pr_size.y,
  1510. X           PIX_XOR, cut_buffer_pr,0,0);
  1511. X+      pw_batch_off(pw);
  1512. X      }
  1513. X     else
  1514. X      {
  1515. X***************
  1516. X*** 513,523 ****
  1517. X  Panel_item      item;
  1518. X  Event           *event;
  1519. X  {
  1520. X     if (top_x || top_y || bottom_x || bottom_y)
  1521. X      {
  1522. X        select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1523. X        region_fix();
  1524. X!       pw_replrop(pw,top_x,top_y,bottom_x-top_x,bottom_y-top_y,PIX_COLOR(cur_color) | PIX_SRC,pattern[(int)panel_get_value(pattern_choice)],0,0);
  1525. X        reset_region();
  1526. X      }
  1527. X  }
  1528. X--- 601,615 ----
  1529. X  Panel_item      item;
  1530. X  Event           *event;
  1531. X  {
  1532. X+ int ROP;
  1533. X+ 
  1534. X     if (top_x || top_y || bottom_x || bottom_y)
  1535. X      {
  1536. X        select_region(pw,top_x,top_y,bottom_x,bottom_y);
  1537. X        region_fix();
  1538. X!       if (!(ROP = get_current_ROP()))
  1539. X!     ROP = PIX_SRC;
  1540. X!       pw_replrop(pw,top_x,top_y,bottom_x-top_x,bottom_y-top_y,PIX_COLOR(cur_color) | ROP,pattern[(int)panel_get_value(pattern_choice)],0,0);
  1541. X        reset_region();
  1542. X      }
  1543. X  }
  1544. X***************
  1545. X*** 542,550 ****
  1546. X    while ((i<MAX_PTS) && (ptlist[i++].x != -1));
  1547. X    no_points = --i;
  1548. X    npts[0] = no_points; 
  1549. X-   pw_polygon_2(pw,0,0,1,npts,ptlist,PIX_XOR,pattern[0],0,0);
  1550. X-   pw_polygon_2(pw,0,0,1,npts,ptlist,PIX_XOR,pattern[0],0,0);
  1551. X  
  1552. X    for (i=0;i < no_points;i++)
  1553. X      {
  1554. X          top_x = MIN(top_x,ptlist[i].x);
  1555. X--- 634,650 ----
  1556. X    while ((i<MAX_PTS) && (ptlist[i++].x != -1));
  1557. X    no_points = --i;
  1558. X    npts[0] = no_points; 
  1559. X  
  1560. X+   /*
  1561. X+    * if the user booted with a '-l' option then clear the area in the lasso
  1562. X+    * if not then just XOR the area in the lasso
  1563. X+    */
  1564. X+   if (!(int)panel_get(lasso_remove, PANEL_TOGGLE_VALUE,0))
  1565. X+   {
  1566. X+     pw_polygon_2(pw,0,0,1,npts,ptlist,PIX_XOR,pattern[0],0,0);
  1567. X+     pw_polygon_2(pw,0,0,1,npts,ptlist,PIX_XOR,pattern[0],0,0);
  1568. X+   }
  1569. X+ 
  1570. X    for (i=0;i < no_points;i++)
  1571. X      {
  1572. X          top_x = MIN(top_x,ptlist[i].x);
  1573. X***************
  1574. X*** 563,568 ****
  1575. X--- 663,673 ----
  1576. X    MY_pr_destroy(cut_buffer_pr);
  1577. X    cut_buffer_pr = my_mem_create(bottom_x-top_x,bottom_y-top_y,image_depth);
  1578. X    pr_polygon_2(cut_buffer_pr,0,0,1,npts,ptlist,PIX_SRC,pw->pw_prretained,top_x,top_y);
  1579. X+ 
  1580. X+   if ((int)panel_get(lasso_remove, PANEL_TOGGLE_VALUE,0))
  1581. X+   {
  1582. X+     pw_polygon_2(pw,top_x,top_y,1,npts,ptlist,PIX_CLR,0,0,0);
  1583. X+   }
  1584. X    reset_region();
  1585. X    print_msg("The selected area is now in the Cut/Paste buffer.");
  1586. X  }
  1587. X***************
  1588. X*** 582,590 ****
  1589. X  int i;
  1590. X  int npts[1];
  1591. X  
  1592. X!   found =0;
  1593. X    i=0;
  1594. X!   while (i<MAX_PTS && !found)
  1595. X      {
  1596. X        if (py_pts[i++].x == -1)
  1597. X      found=TRUE;
  1598. X--- 687,695 ----
  1599. X  int i;
  1600. X  int npts[1];
  1601. X  
  1602. X!   found = FALSE;
  1603. X    i=0;
  1604. X!   while ((i<MAX_PTS) && (!found))
  1605. X      {
  1606. X        if (py_pts[i++].x == -1)
  1607. X      found=TRUE;
  1608. X***************
  1609. X*** 631,637 ****
  1610. X  
  1611. X  
  1612. X  /*
  1613. X!  * take the list of currnet vertexs and draw up the
  1614. X   * the polygon and fill it with the current paint pattern
  1615. X   */
  1616. X  draw_poly(py_pts)
  1617. X--- 736,742 ----
  1618. X  
  1619. X  
  1620. X  /*
  1621. X!  * take the list of current vertexs and draw up the
  1622. X   * the polygon and fill it with the current paint pattern
  1623. X   */
  1624. X  draw_poly(py_pts)
  1625. X***************
  1626. X*** 639,645 ****
  1627. X  {
  1628. X  int npts[1];
  1629. X  int found;
  1630. X! int i;
  1631. X  
  1632. X    if (py_pts[0].x == 0-1)
  1633. X      return(0);
  1634. X--- 744,750 ----
  1635. X  {
  1636. X  int npts[1];
  1637. X  int found;
  1638. X! int i,ROP;
  1639. X  
  1640. X    if (py_pts[0].x == 0-1)
  1641. X      return(0);
  1642. X***************
  1643. X*** 656,681 ****
  1644. X    npts[0] =i;
  1645. X  
  1646. X    /*
  1647. X     * do we want this baby filled ????
  1648. X     */ 
  1649. X    if ((int)panel_get_value(command_choice)==POLY_F)
  1650. X!        pw_polygon_2(pw,0,0,1,npts,py_pts,PIX_COLOR(cur_color) | PIX_SRC,pattern[(int)panel_get_value(pattern_choice)],0,0);
  1651. X  
  1652. X    /*
  1653. X     * do we want to wrap the polygon up in a vector border
  1654. X     */
  1655. X!   if ((int)panel_get_value(border_cycle))
  1656. X    {
  1657. X        i=1;
  1658. X        while (i<MAX_POLY && (py_pts[i].x != -1))
  1659. X          {
  1660. X          pw_vector(pw,py_pts[i].x,py_pts[i].y,
  1661. X!                  py_pts[i-1].x,py_pts[i-1].y,PIX_SRC,cur_color);
  1662. X          i++;
  1663. X          }
  1664. X        i--;
  1665. X        pw_vector(pw,py_pts[i].x,py_pts[i].y,
  1666. X!                  py_pts[0].x,py_pts[0].y,PIX_SRC,cur_color);
  1667. X    }
  1668. X    clean_poly();
  1669. X  }
  1670. X--- 761,820 ----
  1671. X    npts[0] =i;
  1672. X  
  1673. X    /*
  1674. X+    * get the current ROP for drawing or default PIX_SRC
  1675. X+    */
  1676. X+   if (!(ROP = get_current_ROP()))
  1677. X+     ROP = PIX_SRC;
  1678. X+ 
  1679. X+   /*
  1680. X+    * erase the orginal vectors in the poly, if filled and
  1681. X+    * the no-border option is set
  1682. X+    */
  1683. X+ /*****
  1684. X+   if ((((int)panel_get_value(command_choice)==POLY_F) &&
  1685. X+          ((int)panel_get_value(border_cycle) == 0)) ||
  1686. X+       ((int)panel_get_value(command_choice)==POLY_H) &&
  1687. X+     (ROP != PIX_SRC))
  1688. X+ *******/
  1689. X+   {
  1690. X+       i=1;
  1691. X+       while (i<MAX_POLY && (py_pts[i].x != -1))
  1692. X+         {
  1693. X+         pw_vector(pw,py_pts[i].x,py_pts[i].y,
  1694. X+                  py_pts[i-1].x,py_pts[i-1].y, PIX_XOR,1);
  1695. X+         i++;
  1696. X+         }
  1697. X+   }
  1698. X+ 
  1699. X+ 
  1700. X+   /*
  1701. X     * do we want this baby filled ????
  1702. X     */ 
  1703. X    if ((int)panel_get_value(command_choice)==POLY_F)
  1704. X!        {
  1705. X!            if (!(ROP = get_current_ROP()))
  1706. X!         ROP = PIX_SRC;
  1707. X  
  1708. X+        pw_polygon_2(pw,0,0,1,npts,py_pts,PIX_COLOR(cur_color) | ROP,pattern[(int)panel_get_value(pattern_choice)],0,0);
  1709. X+        }
  1710. X+ 
  1711. X    /*
  1712. X     * do we want to wrap the polygon up in a vector border
  1713. X+    * but if we on unfilled-poly then always do vectors
  1714. X     */
  1715. X!   if (((int)panel_get_value(border_cycle)) || 
  1716. X!     ((int)panel_get_value(command_choice)==POLY_H))
  1717. X    {
  1718. X        i=1;
  1719. X        while (i<MAX_POLY && (py_pts[i].x != -1))
  1720. X          {
  1721. X          pw_vector(pw,py_pts[i].x,py_pts[i].y,
  1722. X!                  py_pts[i-1].x,py_pts[i-1].y,PIX_COLOR(cur_color) | ROP,cur_color);
  1723. X          i++;
  1724. X          }
  1725. X        i--;
  1726. X        pw_vector(pw,py_pts[i].x,py_pts[i].y,
  1727. X!                  py_pts[0].x,py_pts[0].y,PIX_COLOR(cur_color) | ROP,cur_color);
  1728. X    }
  1729. X    clean_poly();
  1730. X  }
  1731. Xdiff -c ./fat.c ../../Ver2.3/source/fat.c
  1732. X*** ./fat.c    Mon Jun 13 23:53:24 1988
  1733. X--- ../../Ver2.3/source/fat.c    Fri Jun 17 00:27:13 1988
  1734. X***************
  1735. X*** 30,35 ****
  1736. X--- 30,40 ----
  1737. X          date:    Tue Mar 22 22:04:58 EST 1988
  1738. X          author:    rayk
  1739. X          changes:add comments
  1740. X+ 
  1741. X+         date:    Sun Jun  5 23:47:42 EDT 1988
  1742. X+         author:    rayk
  1743. X+         changes:fixed bug in magnify, so that it does
  1744. X+             a save_screen when you go into fat_mode
  1745. X  **************************************************************************/
  1746. X  
  1747. X  #include "header.h"
  1748. X***************
  1749. X*** 57,62 ****
  1750. X--- 62,68 ----
  1751. X      fat_source_x = select_pt_x- (int)window_get(fat_canvas, CANVAS_WIDTH)/magnify_fac/2;
  1752. X      fat_source_y = select_pt_y- (int)window_get(fat_canvas, CANVAS_HEIGHT)/magnify_fac/2;
  1753. X      clean_point();
  1754. X+     save_screen();
  1755. X      (void)window_set(fat_frame, WIN_SHOW, TRUE, 0);
  1756. X      select_fat_region();
  1757. X      fat_update(0,0);
  1758. X***************
  1759. X*** 137,143 ****
  1760. X  {
  1761. X    x = fat_source_x + x/magnify_fac;
  1762. X    y = fat_source_y + y/magnify_fac;
  1763. X!   update_cur_color(0,0,pw_get(pw,x,y));
  1764. X  }
  1765. X  
  1766. X  
  1767. X--- 143,150 ----
  1768. X  {
  1769. X    x = fat_source_x + x/magnify_fac;
  1770. X    y = fat_source_y + y/magnify_fac;
  1771. X!   if (pw->pw_pixrect->pr_depth > 1)
  1772. X!     update_cur_color(0,0,pw_get(pw,x,y));
  1773. X  }
  1774. X  
  1775. X  
  1776. Xdiff -c ./ffill.c ../../Ver2.3/source/ffill.c
  1777. X*** ./ffill.c    Mon Jun 13 23:53:25 1988
  1778. X--- ../../Ver2.3/source/ffill.c    Fri Jun 17 00:27:15 1988
  1779. X***************
  1780. X*** 76,83 ****
  1781. X  ffill(x,y,n)
  1782. X  int x,y,n;
  1783. X  {
  1784. X! int flag;
  1785. X! register i,j,k,bx;
  1786. X  
  1787. X          if (window_get(canvas, WIN_EVENT_STATE, MS_RIGHT))
  1788. X              return(FILL_CANCEL);
  1789. X--- 76,83 ----
  1790. X  ffill(x,y,n)
  1791. X  int x,y,n;
  1792. X  {
  1793. X! int flag,bx;
  1794. X! register i,j,k;
  1795. X  
  1796. X          if (window_get(canvas, WIN_EVENT_STATE, MS_RIGHT))
  1797. X              return(FILL_CANCEL);
  1798. X***************
  1799. X*** 91,98 ****
  1800. X--- 91,141 ----
  1801. X              bx = i;
  1802. X          else 
  1803. X              {
  1804. X+             break;
  1805. X+             }
  1806. X+         }
  1807. X+     for (j=x+1;j<image_wid;j++)
  1808. X+         if (pw_get(pw,j,y)!=n)
  1809. X+             bx = j;
  1810. X+         else 
  1811. X+              {
  1812. X              pw_vector(pw,bx,y,x,y, PIX_SRC,n);
  1813. X              break;
  1814. X+              }
  1815. X+ 
  1816. X+         flag = 0;
  1817. X+     for (k=i+1;k<j;k++)
  1818. X+     {
  1819. X+         if (pr_get(pw->pw_prretained,k,y-1)!=n)
  1820. X+            flag = ffill(k-1,y-1,n);
  1821. X+         if (pr_get(pw->pw_prretained,k,y+1)!=n)
  1822. X+            flag = ffill(k-1,y+1,n);
  1823. X+                 if (flag) break;
  1824. X+     }
  1825. X+ return(flag);
  1826. X+ }
  1827. X+ 
  1828. X+ /******************************************************
  1829. X+ ffill(x,y,n)
  1830. X+ int x,y,n;
  1831. X+ {
  1832. X+ int flag,bx;
  1833. X+ register i,j,k;
  1834. X+ 
  1835. X+         if (window_get(canvas, WIN_EVENT_STATE, MS_RIGHT))
  1836. X+             return(FILL_CANCEL);
  1837. X+ 
  1838. X+     if (x<0 || x>=image_wid || y<0 || y>=image_hgt || pw_get(pw,x,y)==n)
  1839. X+         return(0);
  1840. X+     pw_put(pw,x,y,n);
  1841. X+         bx = x-1;
  1842. X+     for (i=x-1;i>=0;i--) {
  1843. X+         if (pw_get(pw,i,y)!=n)
  1844. X+             bx = i;
  1845. X+         else 
  1846. X+             {
  1847. X+             pw_vector(pw,bx,y,x,y, PIX_SRC,n);
  1848. X+             break;
  1849. X              }
  1850. X          }
  1851. X          bx = x+1;
  1852. X***************
  1853. X*** 117,119 ****
  1854. X--- 160,163 ----
  1855. X  return(flag);
  1856. X  }
  1857. X  
  1858. X+ **********************************************************/
  1859. Xdiff -c ./header.h ../../Ver2.3/source/header.h
  1860. X*** ./header.h    Mon Jun 13 23:51:58 1988
  1861. X--- ../../Ver2.3/source/header.h    Fri Jun 17 00:25:27 1988
  1862. X***************
  1863. X*** 37,43 ****
  1864. X  #include <suntool/canvas.h>
  1865. X  #include <suntool/walkmenu.h>
  1866. X  #include <suntool/scrollbar.h>
  1867. X- #include <math.h>
  1868. X  #include <pixrect/pixrect_hs.h>
  1869. X  
  1870. X  
  1871. X--- 37,42 ----
  1872. X***************
  1873. X*** 67,75 ****
  1874. X  #define INVERSE 2
  1875. X  #define ROTATE 3
  1876. X  #define COPY 4
  1877. X! #define PASTE 5
  1878. X  #define MOVE 6
  1879. X  #define CUT 7
  1880. X  
  1881. X  #define PIX_XOR PIX_SRC^PIX_DST
  1882. X  #define MAX_PTS 3000
  1883. X--- 66,75 ----
  1884. X  #define INVERSE 2
  1885. X  #define ROTATE 3
  1886. X  #define COPY 4
  1887. X! #define SCALE 5
  1888. X  #define MOVE 6
  1889. X  #define CUT 7
  1890. X+ #define PASTE 8
  1891. X  
  1892. X  #define PIX_XOR PIX_SRC^PIX_DST
  1893. X  #define MAX_PTS 3000
  1894. X***************
  1895. X*** 128,133 ****
  1896. X--- 128,135 ----
  1897. X  extern char file_name[MAX_FILE_NAME];
  1898. X  extern struct pixrect *cut_buffer_pr,*undo_pr;
  1899. X  extern struct pixfont *main_font;
  1900. X+ extern struct pixrect *brush_temp_pr;
  1901. X+ extern struct pixrect *brush_temp_pr2;
  1902. X  extern struct pixrect *pattern[];
  1903. X  extern struct pixrect *brushes[];
  1904. X  extern struct  pixfont  *font_array[];
  1905. X***************
  1906. X*** 160,175 ****
  1907. X  
  1908. X  
  1909. X  extern Frame base_frame,fat_frame,color_frame;
  1910. X  extern Canvas canvas,fat_canvas,color_canvas;
  1911. X  extern Pixwin *pw,*fat_pw,*color_pw;
  1912. X  extern Scrollbar    vertical_sb, horizontal_sb;
  1913. X  extern Panel       panel,fat_panel,color_panel,pattern_panel,
  1914. X          brush_panel,region_panel,command_panel;
  1915. X! extern Panel_item magnify_cycle, command_choice,text_size_item;
  1916. X  extern Panel_item  text_panel,file_panel,brush_choice,mono_cycle,save_cycle,
  1917. X      msg_string,color_button,border_cycle,view_cycle,current_pattern,
  1918. X          load_cycle,pattern_choice,region_choice,grid_cycle,
  1919. X!         compress_cycle,undo_button;
  1920. X  
  1921. X  extern struct pixrect            brush1_pr,brush2_pr,brush3_pr,
  1922. X                      brush4_pr,brush5_pr,brush6_pr;
  1923. X--- 162,179 ----
  1924. X  
  1925. X  
  1926. X  extern Frame base_frame,fat_frame,color_frame;
  1927. X+ extern Frame confirmer;
  1928. X  extern Canvas canvas,fat_canvas,color_canvas;
  1929. X  extern Pixwin *pw,*fat_pw,*color_pw;
  1930. X  extern Scrollbar    vertical_sb, horizontal_sb;
  1931. X  extern Panel       panel,fat_panel,color_panel,pattern_panel,
  1932. X          brush_panel,region_panel,command_panel;
  1933. X! extern Panel_item magnify_cycle, command_choice,text_size_item,height_text,width_text;
  1934. X! extern Panel_item lasso_remove;
  1935. X  extern Panel_item  text_panel,file_panel,brush_choice,mono_cycle,save_cycle,
  1936. X      msg_string,color_button,border_cycle,view_cycle,current_pattern,
  1937. X          load_cycle,pattern_choice,region_choice,grid_cycle,
  1938. X!         compress_cycle,undo_button,ROP_cycle,yes_button,no_button;
  1939. X  
  1940. X  extern struct pixrect            brush1_pr,brush2_pr,brush3_pr,
  1941. X                      brush4_pr,brush5_pr,brush6_pr;
  1942. X***************
  1943. X*** 209,215 ****
  1944. X  extern struct pixrect            reg_command1_pr,reg_command2_pr,
  1945. X                      reg_command3_pr,reg_command4_pr,
  1946. X                      reg_command5_pr,reg_command6_pr,
  1947. X!                     reg_command7_pr,reg_command8_pr;
  1948. X  
  1949. X  extern char *malloc();
  1950. X  extern quit();
  1951. X--- 213,220 ----
  1952. X  extern struct pixrect            reg_command1_pr,reg_command2_pr,
  1953. X                      reg_command3_pr,reg_command4_pr,
  1954. X                      reg_command5_pr,reg_command6_pr,
  1955. X!                     reg_command7_pr,reg_command8_pr,
  1956. X!                     reg_command9_pr;
  1957. X  
  1958. X  extern char *malloc();
  1959. X  extern quit();
  1960. X***************
  1961. X*** 234,240 ****
  1962. X  extern poly_addpt();
  1963. X  extern clear_screen();
  1964. X  extern clean_poly();
  1965. X! extern confirmer();
  1966. X  extern draw_circle();
  1967. X  extern draw_oval();
  1968. X  extern init_colortable();
  1969. X--- 239,245 ----
  1970. X  extern poly_addpt();
  1971. X  extern clear_screen();
  1972. X  extern clean_poly();
  1973. X! extern confirm();
  1974. X  extern draw_circle();
  1975. X  extern draw_oval();
  1976. X  extern init_colortable();
  1977. X***************
  1978. X*** 251,253 ****
  1979. X--- 256,263 ----
  1980. X  extern select_pattern();
  1981. X  extern char *expand_file_name();
  1982. X  extern make_new_name();
  1983. X+ extern int get_current_ROP();
  1984. X+ extern resize_canvas();
  1985. X+ extern return_true();
  1986. X+ extern return_false();
  1987. X+ 
  1988. Xdiff -c ./info.c ../../Ver2.3/source/info.c
  1989. X*** ./info.c    Mon Jun 13 23:53:33 1988
  1990. X--- ../../Ver2.3/source/info.c    Fri Jun 17 00:27:19 1988
  1991. X***************
  1992. X*** 32,37 ****
  1993. X--- 32,43 ----
  1994. X          date:    Tue Mar 22 22:04:58 EST 1988
  1995. X          author:    rayk
  1996. X          changes:add comments
  1997. X+ 
  1998. X+         date:    Wed Jun 15 18:12:16 EDT 1988
  1999. X+         author:    rayk
  2000. X+         changes:changed error messages for "info" and "help"
  2001. X+             suggested by ian%sq.sq.com@RELAY.CS.NET
  2002. X+ 
  2003. X  **************************************************************************/
  2004. X  
  2005. X  #include "header.h"
  2006. X***************
  2007. X*** 58,64 ****
  2008. X     fp = fopen(INFO_IMAGE,"r");
  2009. X     if (!fp)
  2010. X     {
  2011. X!       ERROR("I Could not find the information file !!!!");
  2012. X        view_flag = FALSE;
  2013. X        fclose(fp);
  2014. X        return(0);
  2015. X--- 64,70 ----
  2016. X     fp = fopen(INFO_IMAGE,"r");
  2017. X     if (!fp)
  2018. X     {
  2019. X!       ERRORstr("I Could not find the information file : ",INFO_IMAGE);
  2020. X        view_flag = FALSE;
  2021. X        fclose(fp);
  2022. X        return(0);
  2023. X***************
  2024. X*** 66,72 ****
  2025. X     temp_pr = (struct pixrect *)pr_load(fp,color_map);
  2026. X     if (!temp_pr)
  2027. X     {
  2028. X!       ERROR("I Could not find the information file !!!!");
  2029. X        view_flag = FALSE;
  2030. X        fclose(fp);
  2031. X        return(0);
  2032. X--- 72,78 ----
  2033. X     temp_pr = (struct pixrect *)pr_load(fp,color_map);
  2034. X     if (!temp_pr)
  2035. X     {
  2036. X!       ERRORstr("I could not load the information file : ",INFO_IMAGE);
  2037. X        view_flag = FALSE;
  2038. X        fclose(fp);
  2039. X        return(0);
  2040. X***************
  2041. X*** 136,141 ****
  2042. X--- 142,148 ----
  2043. X  char *frame_label;
  2044. X  {
  2045. X  Rect *r;
  2046. X+ Pixwin *temp_pw;
  2047. X  
  2048. X     if (view_flag)
  2049. X     {
  2050. X***************
  2051. X*** 146,203 ****
  2052. X      r = (Rect *) window_get(base_frame, WIN_RECT);
  2053. X      view_frame = window_create(base_frame,FRAME,
  2054. X          FRAME_LABEL,    frame_label,
  2055. X              FRAME_SHOW_LABEL, TRUE,
  2056. X-         WIN_SHOW,    TRUE,
  2057. X          WIN_FONT,    main_font,
  2058. X-         WIN_WIDTH,    view_pr->pr_size.x+20,
  2059. X-         WIN_HEIGHT,    view_pr->pr_size.y+60,
  2060. X              WIN_X,        (r->r_width - view_pr->pr_size.x+20)/2,
  2061. X              WIN_Y,        (r->r_height - view_pr->pr_size.y+50)/4,
  2062. X          0);
  2063. X  
  2064. X      view_canvas = 
  2065. X          window_create(view_frame, CANVAS, 
  2066. X!         WIN_CONSUME_PICK_EVENTS,    WIN_NO_EVENTS,WIN_MOUSE_BUTTONS,
  2067. X!                     LOC_DRAG, LOC_WINENTER,
  2068. X!                     LOC_MOVE, 
  2069. X!                     0,
  2070. X!         WIN_X,        0,
  2071. X!         WIN_Y,        ATTR_ROW(2)+5,
  2072. X!         CANVAS_WIDTH,        view_pr->pr_size.x+5,
  2073. X!         CANVAS_HEIGHT,        view_pr->pr_size.y+5,
  2074. X!         CANVAS_AUTO_SHRINK,        TRUE,
  2075. X!         CANVAS_FIXED_IMAGE,        FALSE,
  2076. X!         CANVAS_AUTO_EXPAND,        TRUE,
  2077. X!         CANVAS_RETAINED,        TRUE,
  2078. X!         0),
  2079. X! 
  2080. X      view_pw = canvas_pixwin(view_canvas);
  2081. X  
  2082. X      if (view_pr->pr_depth > 1)
  2083. X      {
  2084. X      pw_setcmsname(view_pw, "ray kreisel");
  2085. X      pw_putcolormap(view_pw, 0,256,temp_red,temp_green,temp_blue);
  2086. X      }
  2087. X  
  2088. X-     view_panel = window_create(view_frame, PANEL,
  2089. X-          PANEL_LABEL_BOLD,         TRUE,
  2090. X-         WIN_FONT,    main_font,
  2091. X-          WIN_X,             0,
  2092. X-          WIN_Y,             3,
  2093. X-          WIN_HEIGHT,         ATTR_ROW(1)+4,
  2094. X-         0);
  2095. X-    
  2096. X-    (void)panel_create_item(view_panel, PANEL_BUTTON, 
  2097. X-      PANEL_ITEM_X, ATTR_COL(0),
  2098. X-      PANEL_ITEM_Y, ATTR_ROW(0),
  2099. X-      PANEL_LABEL_IMAGE, panel_button_image(view_panel, "done", 5, (Pixfont *)0),
  2100. X-      PANEL_NOTIFY_PROC, view_done,
  2101. X-      0);
  2102. X  
  2103. X    /* write the image files to the canvas */
  2104. X  
  2105. X     pw_write(view_pw,0,0,view_pr->pr_size.x,
  2106. X           view_pr->pr_size.y,PIX_SRC, view_pr,0,0);
  2107. X  }   
  2108. X  
  2109. X  
  2110. X--- 153,221 ----
  2111. X      r = (Rect *) window_get(base_frame, WIN_RECT);
  2112. X      view_frame = window_create(base_frame,FRAME,
  2113. X          FRAME_LABEL,    frame_label,
  2114. X+                 FRAME_INHERIT_COLORS,   TRUE,
  2115. X              FRAME_SHOW_LABEL, TRUE,
  2116. X          WIN_FONT,    main_font,
  2117. X              WIN_X,        (r->r_width - view_pr->pr_size.x+20)/2,
  2118. X              WIN_Y,        (r->r_height - view_pr->pr_size.y+50)/4,
  2119. X          0);
  2120. X  
  2121. X+     view_panel = window_create(view_frame, PANEL,
  2122. X+              PANEL_LABEL_BOLD,           TRUE,
  2123. X+                 WIN_FONT,       main_font,
  2124. X+                 0);
  2125. X+    
  2126. X+    (void)panel_create_item(view_panel, PANEL_BUTTON, 
  2127. X+      PANEL_ITEM_X, ATTR_COL(0),
  2128. X+      PANEL_ITEM_Y, ATTR_ROW(0),
  2129. X+      PANEL_LABEL_IMAGE, panel_button_image(view_panel, "done", 5, (Pixfont *)0),
  2130. X+      PANEL_NOTIFY_PROC, view_done,
  2131. X+      0);
  2132. X+     window_fit(view_panel);
  2133. X+ 
  2134. X      view_canvas = 
  2135. X          window_create(view_frame, CANVAS, 
  2136. X!             WIN_CONSUME_PICK_EVENTS,    WIN_NO_EVENTS,WIN_MOUSE_BUTTONS,
  2137. X!                                         LOC_DRAG, LOC_WINENTER,
  2138. X!                                         LOC_MOVE, 
  2139. X!                                         0,
  2140. X!                 WIN_X,          0,
  2141. X!                 WIN_BELOW,      view_panel,
  2142. X!             WIN_WIDTH,          view_pr->pr_size.x,
  2143. X!             WIN_HEIGHT,         view_pr->pr_size.y,
  2144. X!             CANVAS_WIDTH,               view_pr->pr_size.x,
  2145. X!             CANVAS_HEIGHT,              view_pr->pr_size.y,
  2146. X!             CANVAS_AUTO_SHRINK,         FALSE,
  2147. X!             CANVAS_FIXED_IMAGE,         TRUE,
  2148. X!             CANVAS_AUTO_EXPAND,         FALSE,
  2149. X!             CANVAS_RETAINED,            TRUE,
  2150. X!             0),
  2151. X!  
  2152. X      view_pw = canvas_pixwin(view_canvas);
  2153. X  
  2154. X+ 
  2155. X      if (view_pr->pr_depth > 1)
  2156. X      {
  2157. X      pw_setcmsname(view_pw, "ray kreisel");
  2158. X      pw_putcolormap(view_pw, 0,256,temp_red,temp_green,temp_blue);
  2159. X+ 
  2160. X+       temp_pw = (Pixwin *)window_get(view_frame, WIN_PIXWIN);
  2161. X+       pw_setcmsname(temp_pw, "ray kreisel");
  2162. X+       pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  2163. X+ 
  2164. X+       temp_pw = (Pixwin *)window_get(view_panel, WIN_PIXWIN);
  2165. X+       pw_setcmsname(temp_pw, "ray kreisel");
  2166. X+       pw_putcolormap(temp_pw, 0,256,temp_red,temp_green,temp_blue);
  2167. X      }
  2168. X  
  2169. X  
  2170. X    /* write the image files to the canvas */
  2171. X  
  2172. X     pw_write(view_pw,0,0,view_pr->pr_size.x,
  2173. X           view_pr->pr_size.y,PIX_SRC, view_pr,0,0);
  2174. X+ 
  2175. X+    window_fit(view_frame);
  2176. X+    window_set(view_frame, WIN_SHOW, TRUE, 0);
  2177. X  }   
  2178. X  
  2179. X  
  2180. X***************
  2181. X*** 211,217 ****
  2182. X  
  2183. X     if (!file_exist(HELP_FILE))
  2184. X     {
  2185. X!       ERROR("I cannot find the man page for touchup !!!");
  2186. X        return(0);
  2187. X     }
  2188. X  
  2189. X--- 229,235 ----
  2190. X  
  2191. X     if (!file_exist(HELP_FILE))
  2192. X     {
  2193. X!       ERRORstr("I cannot find the man page for touchup : ",HELP_FILE);
  2194. X        return(0);
  2195. X     }
  2196. X  
  2197. X***************
  2198. X*** 231,237 ****
  2199. X      view_frame = window_create(base_frame,FRAME,
  2200. X          FRAME_LABEL,    "Help window",
  2201. X              FRAME_SHOW_LABEL, TRUE,
  2202. X-         WIN_SHOW,    TRUE,
  2203. X          WIN_FONT,    main_font,
  2204. X              WIN_X,        (r->r_width - 600+20)/2,
  2205. X              WIN_Y,        (r->r_height - 512+50)/4,
  2206. X--- 249,254 ----
  2207. X***************
  2208. X*** 258,264 ****
  2209. X                  WIN_X,                  0,
  2210. X          WIN_Y,            ATTR_ROW(2)+5,
  2211. X                  WIN_HEIGHT,             512,
  2212. X!                 WIN_WIDTH,              600,
  2213. X          TEXTSW_FONT,        main_font,
  2214. X                  TEXTSW_IGNORE_LIMIT,    TEXTSW_INFINITY,
  2215. X                  TEXTSW_AUTO_INDENT,     TRUE,
  2216. X--- 275,281 ----
  2217. X                  WIN_X,                  0,
  2218. X          WIN_Y,            ATTR_ROW(2)+5,
  2219. X                  WIN_HEIGHT,             512,
  2220. X!                 WIN_WIDTH,              620,
  2221. X          TEXTSW_FONT,        main_font,
  2222. X                  TEXTSW_IGNORE_LIMIT,    TEXTSW_INFINITY,
  2223. X                  TEXTSW_AUTO_INDENT,     TRUE,
  2224. X***************
  2225. X*** 269,274 ****
  2226. X--- 286,292 ----
  2227. X                  0);
  2228. X  
  2229. X    window_fit(view_frame);
  2230. X+   window_set(view_frame, WIN_SHOW, TRUE, 0);
  2231. X  }   
  2232. X  
  2233. X  
  2234. X
  2235. END_OF_DIFFS.2
  2236. if test 61044 -ne `wc -c <DIFFS.2`; then
  2237.     echo shar: \"DIFFS.2\" unpacked with wrong size!
  2238. fi
  2239. # end of overwriting check
  2240. fi
  2241. if test -f scale.cicon -a "${1}" != "-c" ; then 
  2242.   echo shar: Will not over-write existing file \"scale.cicon\"
  2243. else
  2244. echo shar: Extracting \"scale.cicon\" \(1933 characters\)
  2245. sed "s/^X//" >scale.cicon <<'END_OF_scale.cicon'
  2246. X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
  2247. X */
  2248. X    0xFFFF,0xFFFF,0xFFFF,0x0000,0x8000,0x0000,0x0001,0x0000,
  2249. X    0x8000,0x0000,0x0001,0x0000,0x8000,0x0000,0x0001,0x0000,
  2250. X    0x8000,0x0000,0x0001,0x0000,0x8000,0x0000,0x0001,0x0000,
  2251. X    0x8000,0x0000,0x0001,0x0000,0x8000,0x0000,0x0001,0x0000,
  2252. X    0x8000,0x0000,0x0001,0x0000,0x8000,0x0000,0x0001,0x0000,
  2253. X    0x8000,0x0000,0x0001,0x0000,0x8000,0x0000,0x0001,0x0000,
  2254. X    0x8000,0x0000,0x0001,0x0000,0x8000,0x0000,0x0001,0x0000,
  2255. X    0xB366,0x6000,0x0001,0x0000,0xA000,0x2000,0x0001,0x0000,
  2256. X    0x80F8,0x0000,0x0001,0x0000,0x8306,0x0001,0xDB61,0x0000,
  2257. X    0xA401,0x2001,0x1E21,0x0000,0xA800,0xA001,0x2121,0x0000,
  2258. X    0x898C,0x8040,0x4081,0x0000,0x918C,0x4061,0xB361,0x0000,
  2259. X    0xB000,0x6FF1,0xB361,0x0000,0xB000,0x6FF8,0x8041,0x0000,
  2260. X    0x9000,0x4FF1,0xA161,0x0000,0x9104,0x4061,0x9E61,0x0000,
  2261. X    0xA8F8,0xA040,0x4081,0x0000,0xA800,0xA001,0x2121,0x0000,
  2262. X    0x8401,0x0001,0x1E21,0x0000,0x8306,0x0001,0xDB61,0x0000,
  2263. X    0xA0F8,0x2000,0x0001,0x0000,0xA000,0x2000,0x0001,0x0000,
  2264. X    0xB666,0x6000,0x0001,0x0000,0x8000,0x0000,0x0001,0x0000,
  2265. X    0x8000,0x0000,0x0001,0x0000,0x8000,0x0000,0x0001,0x0000,
  2266. X    0x8018,0x0006,0x0001,0x0000,0x8024,0x7182,0x1801,0x0000,
  2267. X    0x8010,0x8042,0x2401,0x0000,0x8008,0x81C2,0x3801,0x0000,
  2268. X    0x8024,0x8242,0x2001,0x0000,0x8018,0x7142,0x1C01,0x0000,
  2269. X    0x8000,0x0000,0x0001,0x0000,0x8000,0x0000,0x0001,0x0000,
  2270. X    0x8000,0x0000,0x0001,0x0000,0x8000,0x0000,0x0001,0x0000,
  2271. X    0x8000,0x0000,0x0001,0x0000,0xFFFF,0xFFFF,0xFFFF,0x0000,
  2272. X    0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  2273. X    0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  2274. X    0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  2275. X    0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  2276. X    0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  2277. X    0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  2278. X    0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
  2279. X    0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
  2280. END_OF_scale.cicon
  2281. if test 1933 -ne `wc -c <scale.cicon`; then
  2282.     echo shar: \"scale.cicon\" unpacked with wrong size!
  2283. fi
  2284. # end of overwriting check
  2285. fi
  2286. echo shar: End of archive 2 \(of 2\).
  2287. cp /dev/null ark2isdone
  2288. MISSING=""
  2289. for I in 1 2 ; do
  2290.     if test ! -f ark${I}isdone ; then
  2291.     MISSING="${MISSING} ${I}"
  2292.     fi
  2293. done
  2294. if test "${MISSING}" = "" ; then
  2295.     echo You have unpacked both archives.
  2296.     rm -f ark[1-9]isdone
  2297. else
  2298.     echo You still need to unpack the following archives:
  2299.     echo "        " ${MISSING}
  2300. fi
  2301. ##  End of shell archive.
  2302. exit 0
  2303.  
  2304.